Results 1 to 6 of 6

Thread: [RESOLVED] Initializing Custom Control at runtime

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    6

    Resolved [RESOLVED] Initializing Custom Control at runtime

    Hi,

    I've a user control in a window form application and I want initialize it, at runtime, with a custom method in the Form1 class.

    public partial class Form1 : System.Windows.Forms.Form
    {
    private UC1 myUserControl;
    ...

    In the Form1.cs InitializeComponent method I've :

    this.UC1 = initComponent();

    This is a method of the Form1 class, that return a myUserControl object.

    I can compile but if I switch to the designer I get this error :

    Impossible to find the method 'System.Windows.Forms.Form.initComponent'

    Why this ?
    Last edited by cfirex; Nov 11th, 2007 at 06:38 PM.

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