- Public Class Form1
- Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
- 'This is what happens when the Hello button is clicked.
- If TextBoxX1.Text = "Yellow" Then 'Looks if the text box says Yellow. If it does it reads the next line of code.
- If CheckBoxX2.Checked Then 'If Check Box 2 is checked, it will
- MessageBox.Show("Hello") 'make a message box reading Hello.
- End If
- MessageBox.Show("You Typed Yellow!") 'This line is always read if the text box says Yellow because there is no If statement.
- If CheckBoxX1.Checked Then 'If check box 1 is checked, it will
- MessageBox.Show("Goodbye") 'make a messagebox reading goodbye.
- End If
- Else : MessageBox.Show("Please type Yellow into the text box") 'This in continued from the first line of code. If the textbox
- 'does not read Yellow, it performs only this line of code.
- End If
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- MessageBox.Show("Welcome To Teh Program!") 'This is what happens when Form 1 loads.
- MessageBox.Show("Made by Dylan! :D")
- End Sub
- Private Sub RatingStar1_RatingChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RatingStar1.RatingChanged
- MessageBox.Show("Thanks for the rating!") 'When the rating is changed it shows a message box.
- End Sub
- End Class
lolwut Source Code
Posted by Anonymous on Sun 26th Sep 2010 08:03
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
kpaste.net RSS