Results 1 to 6 of 6

Thread: problem while creating new form instance in code!!

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Posts
    61

    problem while creating new form instance in code!!

    hi,

    somewhere in my code i want to create an object from a form and simply show it, but when doing so the program hangs, and then has to be end tasked, whats the problem?!!


    the code is something like :
    dim frm as new form1()
    frm.text="this is a test"
    frm.show

  2. #2

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Posts
    61
    by the way , the code for creating the form is inside a method in a module

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I've tried many times to generate an error while do what you did but it works with no problems .

  4. #4

    Thread Starter
    Registered User
    Join Date
    Apr 2003
    Posts
    61
    the form is created in a new thread ( not main thread ) is that was causes the problem?!

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Can you post some code !

  6. #6
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    the programs very long , and not well written , posting it will do no good, the weird thing is that if i showdialog the form, it works fine!!! any idea?

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