With a new version of Visual Studio comes another choice of application type using XAML or Windows Presentation Foundation (WPF for short!) Here is Hello World with a little bit of XAML magic using Visual Basic 2008 Express Edition.
Start Microsoft Visual Basic 2008 Express Edition, then select File then New Project... Choose WPF Application from the New Project Window, enter a name for the Project and then click OK, see below:
A Blank Window named Window1 should then appear, see below:
Then from the Common tab on the Toolbox select the Button component:
Draw a Button on the Window, see below:
Then goto the Properties box and change the Name to btnHelloWorld and the Content property from Button to Click Here, see below:
Double Click on the Button Control and type in the Button1_Click Sub:
MsgBox("Hello World", MsgBoxStyle.Information, "Hello World")
Save the Project as you have now finished the application, then click on Start:
When you do the following will appear:
Now click where it says "Click Here" and a Message Box will appear looking something like this:
Just Click on OK and then click on the Close button on the top right of Window1 to end the application.
That was your first working Visual Basic 2008 Express Edition application, until the next installment of the Visual Basic Tutorial! Try changing the Text and Title of the Message Box or try changing the code and adding more parts, you can learn a lot from this simple application!