Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
Close()
End Sub
|
Private Sub btnAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbout.Click
Dim frmAbout As Form
frmAbout = New About
frmAbout.Show()
End Sub
|
Private Sub btnValidate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnValidate.Click
MsgBox("This is an acknowledgement from the inheritance")
End Sub
|
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If Me.CheckBox1.Checked Then Text = "Checked"
If Me.CheckBox1.Checked = False Then Text = "Non Checked"
End Sub
|
Private Sub btnHelper_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHelper.Click
Dim frmHelp As New Helper
frmHelp.ShowDialog()
End Sub
|
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim PenRed As New Pen(Color.Red, 2)
e.Graphics.DrawRectangle(PenRed, 20, 20, 350, 270)
End Sub
|

| Text: Small |
| Name: rdoSmall |
| Checked: True |
| Text: Medium |
| Name: rdoMedium |
| Text: Large |
| Name: rdoLarge |
| Text: 7.55 |
| TextAlign: Right |
| Name: txtPizzaPrice |

Public Class Form1
Inherits System.Windows.Forms.Form
Dim btnSubmit As Button
|
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
btnSubmit = New Button
btnSubmit.Text = "Submit"
btnSubmit.Left = (Me.Width \ 2) - 40
btnSubmit.Top = 40
Me.Controls.Add(btnSubmit)
End Sub
|
Private Sub Submitter(ByVal sender As Object, ByVal e As EventArgs)
MsgBox("Your employment application has been submitted. We will get back to you")
End Sub
|
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
btnSubmit = New Button
btnSubmit.Text = "Submit"
btnSubmit.Left = (Me.Width \ 2) - 40
btnSubmit.Top = 40
AddHandler btnSubmit.Click, AddressOf Submitter
Me.Controls.Add(btnSubmit)
End Sub
|
Private Sub rdoSmall_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoSmall.CheckedChanged
Me.txtPizzaPrice.Text = "$7.55"
End Sub
Private Sub rdoMedium_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoMedium.CheckedChanged
Me.txtPizzaPrice.Text = "$9.35"
End Sub
Private Sub rdoLarge_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoLarge.CheckedChanged
Me.txtPizzaPrice.Text = "$11.25"
End Sub
|
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
End
End Sub
|