daily pastebin goal
57%
SHARE
TWEET

Shared Methods to set control properties outside the form

CryptoJones Dec 23rd, 2015 (edited) 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top