Saturday, November 5, 2011

Hello World in Visual Basic 2010 Sample


A simple visual basic 2010 program that will show the message “Hello World”. In this tutorial you need one form with the caption name “Hello World” and one button object called button1 as shown the code below. When user hit the button, it will popup the message “Hello World”.
Programming Code
‘A “Hello, World!” program in Visual Basic .net.
Public Class Form1
Private
 Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandlesButton1.Click
Msgbox
("Hello, World")
End
 Sub

‘Close sample code for vb.net

Sub
 btnClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClose.Click
Me
.Close()
End
 Sub
 
End Class

No comments:

Post a Comment