Click to See Complete Forum and Search --> : Control Notifications


Palanisamy
May 15th, 1999, 09:56 PM
Hi ALL,
In a VB form I am having different types of controls.Say 3 text boxes and 2 combo boxes.
I am accepting an input in one textbox.Whatever
the value entered in that textbox should come in
all the controls.The Main important thing is you should not write the Code in Any of the events in the control.For my knowledge , I think using API
We can do. Can you anybody give me the exact solution for this one?.
Thanks in advance.
Regards,
Palani.

Lothar Haensler
May 17th, 1999, 09:29 AM
you could subclass all relevant controls and handle the events in the subclassing procedure.
To do subclassing check out the SetWindowLong API
and use the AddressOf operator for getting the address of the procedure that is supposed to handle the events.
And..., honestly I strongly disagree with your statement "...you should not write the Code in Any of the events in the control"

That's the way VB is designed, IMHO. Thus writing against or around that design is something that I would not recommend.

Palanisamy
May 18th, 1999, 12:16 AM
Hi Lothar,
Thanks for your Information.I will look for subClassing.If you give me an simple Code for Two Text box controls in a Form, I will be happy.Because this is urgent one for me.
Thanks in advance !

Regards,
Palani.