Hi,
I have a windows form with a lot of controls (VB.Net).
I need to chnage the text of the cancel button from "Close" to "Cancel change" when any of these controls are checked/clicked/changed.
I could do LOTS of subs to generate cmdCancel.Text = "Cancel change", but I'm thinknig there might be a way to hook up to the page events or so, so that as soon as ANY control is changed, the name of the button is changed, like this:
However, there is no such event. Does anyone know of a way to handle this situation?
All the best,
Pettrer
I have a windows form with a lot of controls (VB.Net).
I need to chnage the text of the cancel button from "Close" to "Cancel change" when any of these controls are checked/clicked/changed.
I could do LOTS of subs to generate cmdCancel.Text = "Cancel change", but I'm thinknig there might be a way to hook up to the page events or so, so that as soon as ANY control is changed, the name of the button is changed, like this:
VB.NET:
Private Sub frmMyform_changed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.ControlChanged
cmdCancel.Text = "Cancel change"
End Sub
However, there is no such event. Does anyone know of a way to handle this situation?
All the best,
Pettrer