VB.Net GUI Graphic User Interface.
Getting The Basics Done.
Start from Clicking the Sidebar on the left "ToolBars" Find the SubMenu All Windows Forms.
Click "Button"
Then Drag the button to the form.
Double Click on the Button, The Code Snippet That gets generated will handle the click even for that button.
now we want to type.
MsgBox("Login Event")
' This is a Dummy Event.
' Now Go Back to the Form Designer, By Clicking on View, then Click Designer.
' Now we want to add to Textbox's. Go through the ToolBar and Find "TextBox"
' Now Add Another Textbox Underneath your other Textbox.
Should Look Like This.
' Go Back To your Code, By View, Code
Up the top of the Page you will see "Public Class Form1"
Underneath that line write this.
Friend Username As String = "Admin"
Friend Password As String = "Pass"
' These are your variables to login.
' Go Back to your Designer.
Double Click on your "Button."
Delete the Dummy Code "MsgBox("Login Event")"
Type this:
If Textbox1.Text = Username And Textbox2.Text = Password Then
MsgBox("Welcome" & Username)
Else
MsgBox("Invalid Password or Username")
End If
now you are done.
Showing posts with label Hello World. Show all posts
Showing posts with label Hello World. Show all posts
Wednesday, 23 January 2013
VB.net Tutorial 1
Getting Started:
Please make sure you have Visual Studio, you can get visual studio from Here or Here. Now that we have Visual Studio we will begin by making a New project.
Step 1:
Then select Windows Forms Application
Step 2
Now you will see a form.
Step 3
Now here is the tricky bit, Double Click on the Grey Background of the form, you will then see a Code Snippet that handles the form_load.
Type the following code.
Dim Answer As String
Answer = "Hello World"
MsgBox(Answer)
Thats it, welcome to Vb.net
Please make sure you have Visual Studio, you can get visual studio from Here or Here. Now that we have Visual Studio we will begin by making a New project.
Step 1:
Then select Windows Forms Application
Step 2
Now you will see a form.
Step 3
Now here is the tricky bit, Double Click on the Grey Background of the form, you will then see a Code Snippet that handles the form_load.
Type the following code.
Dim Answer As String
Answer = "Hello World"
MsgBox(Answer)
Thats it, welcome to Vb.net
Subscribe to:
Posts (Atom)




