-
December 21st, 2000, 03:01 PM
#1
Event tracking of controls created during run-time
Hi all,
I have some vb controls dynymically created during the form load, like this during the form_load:
set objCtl = controls.Add(strCtlNameVB, strCtlNameCtl)
In other word, I don't know the name, type of these controls when I design the form. How can I track the event for these controls, such as LostFocus? I tried to use Controls collection but no luck.
Thanks,
Joe
chunjoeli@hotmail.com
-
December 22nd, 2000, 11:06 AM
#2
Re: Event tracking of controls created during run-time
You probably need to put this in a Class module.
There is a tutorial on
http://www.**************/
titled "CATCHING EVENTS OF DINAMICALY ADDED CONTROL ARRAYS" which discusses how to accomplish this but this tutorial has several flaws. It is doable however if you have enough programming experience to overcome them. (note the spelling of Dynamically in its title)
John G
-
December 22nd, 2000, 12:18 PM
#3
Re: Event tracking of controls created during run-time
I was looking for it. I cannot test it right now, but I will do. Thanks for sharing, John.
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
December 29th, 2000, 01:50 PM
#4
Re: Event tracking of controls created during run-time
Thanks John, that was very helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|