Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

First Program in Visual Basic.NET


 

 

To begin programming in Visual Basic .NET, you can either compile directly from the command line with the .NET SDK, use Microsoft's Visual Studio IDE, or the open-source SharpDevelop IDE.

In this manual, however, we will only be covering Microsoft's official IDE. Programming a form (window) by hand can be challenging if you are not familliar with the language, so starting with a good form designer will help a lot.

Okay, it's now time for your first program!

Start up a Visual Basic .NET IDE and create a windows application.

Double click on the form to open up the code view. You should see something similar to:

Public Class Form1 Inherits System.Windows.Forms.Form
[Windows Form Designer generated code]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

End Class


Enter in the follwing code in the Form_Load Sub (between the "Private Sub" line and the "End Sub" line):

MessageBox.Show("Hello World!")

This creates your classic "Hello World!" program.

Press F5 or go to the Debug menu and select Start to start the program. You should see an alert box that says "Hello World!" and then the main window (with nothing on it) should open. Click the "X" in the title bar like you would to quit any program!

 

 

All text is available under the terms of the GNU Free Documentation License
Source : Wikibooks


 

 



 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
move a directory(C Sharp)
display the available mac addresses(C Sharp)
Earth years to other planets(C)
Access connection(VB)
delete a directory with Delete(C Sharp)
No right click(ASP)
perform a DNS query(C Sharp)
File Details(ASP)




Copyright © 2004 by programmershelp.co.uk