Cleaning up my if statments
Basically if i wanted my controls to be checked at startup id use a setting obviously
Code:
'UI Settings
chkCloseToTray.Checked = My.Settings.CloseToTray
chkAlwaysShowSystemTrayIcon.Checked = My.Settings.AlwaysShowTrayIcon
chkMinimizeToTray.Checked = My.Settings.MinimizeToTray
and so on, but what if i wanted to disable a control if a setting was true???
Code:
'form load
chkRandomSafeColor.Checked = My.Settings.RandomColor
under that would be next
Code:
lblClickToChangeSafeHighlightColor.Enabled = 'what would go here????
pbHighlightColor.Enabled
Would there be some sort of IsNot my.setting.....
Re: Cleaning up my if statments
A simple not should be sufficient...
txtSomeTextBox.Enabled = Not My.Settings.SomeSetting
-tg
Re: Cleaning up my if statments
Re: Cleaning up my if statments
Remember to mark your thread resolved :)