Hello World ExampleThis is a featured page

This simple tutorial will walk you through the basic steps of creating a program.


Create a new windows forms project File/New and name helloworld, you should see a blank form in front of you, double click on it and you will see the code for the form. You will need to add the following code below where it says public class form1:

Dim displayfont As Font

And then under Form1_load, add the following:

displayfont = New Font("Georgia", 24, FontStyle.Bold, GraphicsUnit.Pixel)

And finally add the following outsie of the form1_load sub:

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.DrawString("Hello World", displayfont, Brushes.Blue, 32, 96)
End Sub


Now run the application (f5) and you should see the form with Hello World written across it in blue text.


Mrgameruler
Mrgameruler
Latest page update: made by Mrgameruler , May 4 2008, 12:56 PM EDT (about this update About This Update Mrgameruler Edited by Mrgameruler


view changes

- complete history)
Keyword tags: tutorial vb
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)