Zebra0.com

Learn to Program Step-by-Step

Hello World

Adding code to the click event

Adding code to the click event

Get Adobe Flash player
Public Class FrmHello

    Private Sub FrmHello_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Beige
        Me.Text = "hello out there!"
        Me.LblGreetings.Text = "Greetings earthlings"
    End Sub

    Private Sub GoRed(sender As Object, e As EventArgs) Handles BtnRed.Click, BtnBlue.Click
        Me.BackColor = sender.backcolor
        Me.LblGreetings.Text = sender.text
    End Sub
End Class

To do:

  1. Experiment by changing other properties of the form and label
  2. Experiment by adding buttons for other colors
Last modified: January 30 2025 14:19:19.