Results 1 to 7 of 7

Thread: VS 2005 Custom Control - With Custom Designer

  1. #1

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Question VS 2005 Custom Control - With Custom Designer

    Hello,

    I am trying to create a custom control that for all intents and purposes is a panel control with a header bar and a button in the header. The problem I am having is that I can't seem to create a control that will child other controls during design time.

    So basically I create a user control that contains a panel. I then import that control and place it on a form in another project. Then I try to put a Button let's say, into the custom panel control. This doesn't work.

    I remember that in VS 2003 you had to write special designer code. Though be it quite complicated, I could atleast find something on the net. I have yet to find any good tutorial or documentation, online or in the help files regarding this.

    Thanks,

    Christian
    In life you can be sure of only two things... death and taxes. I'll take death.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: VS 2005 Custom Control - With Custom Designer

    Try following the XPCC link in my signature. I think that there may be some information at that site about doing what you're asking about.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: VS 2005 Custom Control - With Custom Designer

    Any help guys or gals?
    In life you can be sure of only two things... death and taxes. I'll take death.

  4. #4
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: VS 2005 Custom Control - With Custom Designer

    What I have done in the past is inherit the panel control, then override the paint event to draw what I wanted to change about the panel control using GDI. DOing it that way I have no issues adding controls to the panel.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  5. #5

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: VS 2005 Custom Control - With Custom Designer

    You add the controls at design time?
    In life you can be sure of only two things... death and taxes. I'll take death.

  6. #6
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: VS 2005 Custom Control - With Custom Designer

    Yeah.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  7. #7

    Thread Starter
    Fanatic Member cpatzer's Avatar
    Join Date
    Sep 2004
    Posts
    537

    Re: VS 2005 Custom Control - With Custom Designer

    I'll give that a try, thanks.
    In life you can be sure of only two things... death and taxes. I'll take death.

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