


In Chapter 4 of VB6 for Dummies we write BASIC code to go with the simple form created in chapter 3.
The code looks something like this:
Private Sub cmdExit_Click() Unload Me End Sub Private Sub optFrown_Click() imgFrown.Visible = True imgSmile.Visible = False imgGrin.Visible = False txtSmile.Text = "" txtGrin.Text = "" txtFrown.Text = "Good bye, cruel world." End Sub Private Sub optGrin_Click() imgFrown.Visible = False imgSmile.Visible = False imgGrin.Visible = True txtSmile.Text = "" txtGrin.Text = "I'm going to Disney World!" txtFrown.Text = "" End Sub Private Sub optSmile_Click() imgFrown.Visible = False imgSmile.Visible = True imgGrin.Visible = False txtSmile.Text = "Hello, world!" txtGrin.Text = "" txtFrown.Text = "" End Sub
|
No comments:
Post a Comment