Thursday, May 26, 2016

Crte a VB.net



Crte a in VB.net
Today I will tch you how to crte a very simple in VB.netA (or ) is a very simple program that provides you a collection of for a certain program.

How to crte a project in Visual Studio?
Exists many ways to crte a new project in VS. For example, when you open your VS program, in theStart Pageyou will see the optionNewProject ...If you can´t see the Start Page you can also click inFile > New Project > Select Visual Basic > Forms AppliionRename your project name if you want and clickOK.It´s sy!
What controls we need ?
For a simple all you need is a TextBox and a Button. Advanced sometimes also verify if the specific program is installed and if the are available for that version. There also for multi-programs. In that case you can use a checkbox to specify the program.

After you add in to your Form a textbox and a button, double-click in the Button to crte the Event Click
Now, I relsed two options:This first one erate the using the same sequence
Dim i As Integer = 0 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim list As New ListBox 'Crtes a new listbox control With list.Items .Add("1") 'these Items are the .Add("2") .Add("3") .Add("4") .Add("5") End With
If i = list.Items.Count Then i = 1 TextBox1.Text = list.Items(0) Else TextBox1.Text = list.Items(i) i = i + 1 End If End Sub
This second one erate the altory
Dim As Integer = (Rnd() * 5)' of ... in this example are 5 Select Case Case 1 TextBox1.Text = " Here!1" Case 2 TextBox1.Text = " Here!2" Case 3 TextBox1.Text = " Here!3" Case 4 TextBox1.Text = " Here!4" Case 5 TextBox1.Text = " Here!5"End Select

Need help?
I hope youenjoyed. If you need help plse send an e-mail to hyrokumata@outlook.com

No comments:

Post a Comment