Advertisement
CryptoJones

Shared Methods to set control properties outside the form

Dec 23rd, 2015
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.88 KB | None | 0 0
  1.     Public Shared Sub HideShowComboBox(cbName As ComboBox, visible As Boolean)
  2.         If Not visible Then
  3.             cbName.Visible = False
  4.         Else
  5.             cbName.Visible = True
  6.         End If
  7.     End Sub
  8.  
  9.     Public Shared Sub DisableEnableComboBox(cbName As ComboBox, enabled As Boolean)
  10.         If Not enabled Then
  11.             cbName.Enabled = False
  12.         Else
  13.             cbName.Enabled = True
  14.         End If
  15.     End Sub
  16.  
  17.     Public Shared Sub HideShowTextBox(tbName As TextBox, visible As Boolean)
  18.         If Not visible Then
  19.             tbName.Visible = False
  20.         Else
  21.             tbName.Visible = True
  22.         End If
  23.     End Sub
  24.  
  25.     Public Shared Sub DisableEnableTextBox(tbName As TextBox, enabled As Boolean)
  26.         If Not enabled Then
  27.             tbName.Enabled = False
  28.         Else
  29.             tbName.Enabled = True
  30.         End If
  31.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement