| HTML Tutorials |
|
|
| XML Tutorials |
|
|
| Browser Scripting |
|
|
| Server Scripting |
|
|
| .NET (dotnet) |
|
|
| Multimedia |
|
|
| Web Building |
|
|
| Java Tutorials |
|
|
| Programming Langauges |
|
|
| Soft Skills |
|
|
|
| Building a Visual Basic Application |
 |
 |
|
Creating Your First Application
|
|
In this section, we are not going into the technical aspect of VB programming, just have a feel of it and now, you can try out the examples below:
Example below is a simple program and first of all, you have to launch Microsoft Visual Basic. Normally,to start your new project,a default form Form1 will be available for you. Now, double click on form1 and then the source code window for form1 will appear. Don't worry about the begining and the end statements(i.e Private Sub Form_Load.......End Sub.) and then just key in the lines in between the above two statements exactly as are shown here.When you run the program, you will be surprise that nothing shown up and in order to display the output of the program, you have to add the Form1.show statement like in Example 1,Example 2 and Example 3. Try it out.
|
Example 1
Private Sub Form_Load
For i=1 to 5
print "Hello"
next i
End Sub
Example 2
Private Sub Form_Load
Form1.show
For i=1 to 5
print "Hello"
next i
End Sub
Example 3
Private Sub Form_Load
Form1.show
For i=1 to10
print i
next i
End Sub
|
|
|
Steps in Building a Visual Basic Application
|
|
Step 1At first,draw the interface
Step 2Then,set Properties
Step 3After that write the events code
|
|
Example
|
|
|
This program is a simple program that calculate the volume of a cylinder. Let design the interface:
At first, go to the properties window and change the form caption to Volume Of Cylinder.
Then draw three label boxes and change their captions to height andvolume, Base Radius respectively.
After that,you get three empty boxes by drawing three Text Boxes and clear its text contents.
Named the text boxes asradius ,hght(we cannot use height as it is the built-in control name of VB)and
volume respectively and lastly, insert a command button and change its caption toO.K. and its name to OK. Now save the project as cylinder.vbp and the form as cylinder.vbp as well and we shall leave out the codes at the moment which you shall learn it in lesson3.
|
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
Building a Visual Basic Application,
vb net application,
source code basic,
application source code,
application control,
visual control,
excel application,
application xml,
visual code,
c++ basic,
visual function,
word basic,
application function,
vb application,
building code,
visual window,
building projects,
application text,
application code,
application dll,
visual project,
application object
|
|
| HTML Quizes |
|
|
| XML Quizes |
|
|
| Browser Scripting Quizes |
|
|
| Server Scripting Quizes |
|
|
| .NET (dotnet) Quizes |
|
|
| Multimedia Quizes |
|
|
| Web Building Quizes |
|
|
| Java Quizes |
|
|
| Programming Langauges Quizes |
|
|
| Soft Skills Quizes |
|
|
|