Results 1 to 4 of 4

Thread: How can I add a UserControl Dynamically [resolved]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member ahara's Avatar
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    531

    How can I add a UserControl Dynamically [resolved]

    Hello;

    I am trying to add a simple user control to the controls collection at runtime. Is this possible to do? I keep getting the error: invalid progID...I am not sure if I just don't know the right syntax, or maybe this is not possible.

    As a side note, this control is embedded into the project and I do not want to compile it as a separate .ocx (not worth the additional deployment burdens)...does it still not generate a progID at runtime that I can reference? I have tried:

    VB.UserControl.MultiLineText (control name is MultiLineText)
    UserControl.MultiLineText

    The root cause of all this mess is wanting to generate the whole form at runtime, but for multiline textboxes, the properties MultiLine and ScrollBars are not available at runtime, so any other ideas for how I can get around this are more than welcome. Thanks.
    Last edited by ahara; May 29th, 2004 at 07:47 AM.
    "Knowledge is gained when different people look at the same information in different ways"

    - Louis Pasteur

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width