How to access the event in simplest way
Normally, if I want to make my textbox or combobox change the backcolor when the user gotfocus on the controls i will using the code like this.
VB Code:
Private Sub Text1_GotFocus()
Text1.BackColor = vbYellow
End Sub
Private Sub Text1_LostFocus()
Text1.BackColor = vbWhite
End Sub
But I need to create the code for every control
Got any method allowed me to do only one time for every control ?
Thanks :thumb:
Re: How to access the event in simplest way
Every control? Or every Textbox? If its every textbox.. then just use a control array (search the forums for that).
If its for every control.. then you'll have to subclass the form and change the backcolor of the control through APIs (because theres no way to do something like, wParam.BackColor..).
chem
Re: How to access the event in simplest way
Yes, The only way is array ..
I had changed it ...
Thanks sir..
I'm Not similar to APIs ...