|
Question : OnChange Event (Apply Button) VB.NET
|
|
(This is VB.NET)
I have a form with a checkbox (chkbxBackup). When the checkbox is changed I want to turn on the Apply Button (btnApply).
I have read many posts but do not understand how to write an OnChange Event. Is it a Function or a Sub? I have seen it different ways.
If I have mutiple checkboxes (I.e. chkbxBackup and chkbxDir) do I have to write 2 OnChange Events?
Any help would be appreciated.
Thanks
|
|
Answer : OnChange Event (Apply Button) VB.NET
|
|
I think u want something like Private Sub chkbxBackup_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbxBackup.CheckedChanged if chkbxbackup.checked = true then btnapply.enabled = true end if End Sub
all u have to do is double click on the checkbox u are wanting to work with and then up in the right hand corner below the start button u will see the word checkedchanged, it looks like a drop down box. then select what feature u want and it will put the sub in ur program automatically.
if this wasn't what u wanted I am sorry...
|
|
|