JK VB - Net - 4 Hello World
JK VB - Net - 4 Hello World
• The first line has a Module declaration, the module Module1. VB.Net is
completely object oriented, so every program must contain a module of
a class that contains the data and procedures that your program uses.
• Classes or Modules generally would contain more than one procedure.
Procedures contain the executable code, or in other words, they define
the behavior of the class. A procedure could be any of the following −
– Function
– Sub
– Operator
– Get
– Set
– AddHandler
– RemoveHandler
– RaiseEvent
• The next line ′ This program will be ignored by the compiler and it has
been put to add additional comments in the program.
•
The next line Sub Main() defines the Main procedure, which is the entry
point for all VB.Net programs (execution starts here). The Main
procedure states what the module or class will do when executed.
• The Main procedure specifies its behavior with the
statement
• Console.WriteLine"Hello World“
• For example,
• Button1.Text = "Hello World“
• You can set any of a control ‘s (object )properties using
Properties Window.
• Most of the properties can be set or read during application
execution.
• You can refer to Microsoft documentation for a complete list
of properties associated with different controls and
restrictions applied to them.
Control Methods
MessageBox.Show("Hello, World")
End Sub
End Class
Control Events