Re: Adding controls programmatically
From: Douglas Marquardt (no_spam_at_dummy.com)
Date: 05/19/04
- Next message: Krzysztof Malinowski: "Re: Persistance on ComboBox"
- Previous message: MikeD: "Re: Adding controls programmatically"
- In reply to: Paul Rocca: "Adding controls programmatically"
- Next in thread: Ken Halter: "Re: Adding controls programmatically"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 07:19:52 -0600
Hi Paul:
I suggest you use a Control Array and the Load method
instead of the Add method.
Actually, why load the controls in the form load event --
why not just load them in the IDE as part of a control array?
Doug.
"Paul Rocca" <paul.rocca@audiosoft.co.uk> wrote in message news:c8f94t$ohg$1$8300dec7@news.demon.co.uk...
> I would like to add an array of 10 OCX controls programmaticaly to my form.
> So I create an array variable of the ocx type and then populate it in my
> form load
> event using Controls.Add(....).
> This is all well and good, the controls appear and work and I can set their
> properties
> and generally interact with them.
> But I would like to get events from them and I can't seem to get this to
> work. I tried
> declaring the variable as 'With Events' but it didn't seem to like the fact
> that the variable
> is an array and now I'm a bit stumped. Any ideas?
>
> TIA
>
> Paul
>
>
- Next message: Krzysztof Malinowski: "Re: Persistance on ComboBox"
- Previous message: MikeD: "Re: Adding controls programmatically"
- In reply to: Paul Rocca: "Adding controls programmatically"
- Next in thread: Ken Halter: "Re: Adding controls programmatically"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|