Results 1 to 3 of 3

Thread: Loading a form from within a class

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255

    Loading a form from within a class

    I have my class, and I want one of the methods inside to create an instance of a form... but it won't let me. Is there something I don't know about to do with creating form instances from within class libraries?
    Not at all related to sheep...

  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    I think you need to do something like this:

    PHP Code:
            static void Main(string[] args)
            {
                
    System.Windows.Forms.Form myform = new Form1();
                
    myform.ShowDialog();
            } 

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255
    Well I don't see why that shouldn't work, so thanks!
    Not at all related to sheep...

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