Parthasarathi
September 29th, 1999, 02:33 PM
Hi All,
Recently I was programming in VB and I came across a requirement. I wanted to know programatically what type each control is in a screen . Suppose a form has a command button, a checkbox, a textbox and a listbox. In my program code ( say open window event of the form) I want to know what type of control is Controls(3). I adressed the problem in an indirect way by naming the controls in a predefined format (e.g all textbox controls were named as txt...). In the program I checked controls(i).name . Can anybody give me a more general solution to this problem. If it is not possible in VB can VC++ handle this situation more gracefully ?
Thanking you in advance.
Parthasarathi.
Recently I was programming in VB and I came across a requirement. I wanted to know programatically what type each control is in a screen . Suppose a form has a command button, a checkbox, a textbox and a listbox. In my program code ( say open window event of the form) I want to know what type of control is Controls(3). I adressed the problem in an indirect way by naming the controls in a predefined format (e.g all textbox controls were named as txt...). In the program I checked controls(i).name . Can anybody give me a more general solution to this problem. If it is not possible in VB can VC++ handle this situation more gracefully ?
Thanking you in advance.
Parthasarathi.