Zebra0.com

Learn to Program Step-by-Step

Hello World

Your first Visual Basic program

Your first Visual Basic program

hello-world2
Get Adobe Flash player
Public Class FrmHello

    Private Sub StartUp(sender As Object, e As EventArgs) Handles MyBase.Load
        BackColor = Color.BurlyWood
        Me.Text = "I love Burly wood"
    End Sub

    Private Sub ChangeColor(sender As Object, e As EventArgs) _
                Handles BtnRed.Click, BtnBlue.Click
        Me.BackColor = sender.backcolor 'red or blue
        Me.LblHello.Text = sender.text
    End Sub
End Class

Download the finished project as ZIP

To do:

  1. Experiment with other properties of the form and label
  2. Experiment by adding other controls
Last modified: January 30 2025 14:19:15.