Resetting a Form
Imports System.Windows.Forms Module MainModule Public Sub ResetForm(ByVal FormToReset As Form) Dim objControl As Control For Each objControl In FormToReset.Controls If TypeOf (objControl) Is System.Windows.Forms.TextBox Then objControl.Text = "" ' Clear TextBox ElseIf TypeOf (objControl) Is System.Windows.Forms.CheckBox Then Dim objCheckBox As System.Windows.Forms.CheckBox = objControl objCheckBox.Checked = False ' Uncheck CheckBox ElseIf TypeOf (objControl) Is System.Windows.Forms.ComboBox Then Dim objComboBox As System.Windows.Forms.ComboBox = objControl objComboBox.SelectedIndex = -1 ' Deselect any ComboBox entry End If Next End Sub End Module
1. | Simple window frame | ||
2. | Form Opacity in VB | ||
3. | Non rectangle window in VB | ||
4. | Get Frame Client Rectangle Size | ||
5. | Snap to Control |