displaying a user control from a dll

Discussion in 'C++' started by csarinyamas, Aug 31, 2010.

  1. csarinyamas

    csarinyamas New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I'm trying to use some UI elements via a dll. So what I've done in VS is create a Windows Forms Control Library and defined a UI with the standard toolbox items. I build the dll and lib files successfully.


    Next, I create a standard Windows Forms Application and include the project for the Windows Forms Control i just made. i link the lib file to the Forms Application project and build. in the Forms app, i have a single button that when pressed executes this code:

    MyFormsControl ^c = gcnew MyFormsControl;
    c->Show();


    everything builds with 0 errors or warnings, but the UI i made for the control is never seen after hitting the button in the Forms application. I put a break point there and the code definitely gets hit. can anyone tell me why this doesn't work?

    thanks in advance for any and all help. let me know if any further information is needed. i would also be more than happy to upload a zipped version of both projects if anyone thinks that'll help them figure out what's going on.

    Cheers!
    -Chan.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice