Results 1 to 4 of 4

Thread: call a form with mdichid true

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Unhappy

    Hi


    How I call a FORM with MDICHILD = true (1), from other FORM with MDICHILD = true (2) , without that the (1)
    When I call the form 1 , It return to the form 2 and unload the 1

    ps
    (1) and (2) There are forms names examples

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Auckland, NZ
    Posts
    411
    mutley,

    Are you asking:
    "How can I open a mdiChild form from another mdiChild form so that the first form is unloaded after the second form is loaded?"

    If this is your question then in Form1, you probably have:

    Code:
    Form2.Show
    and in Form2 you will need to add in the Form_Load event:
    Code:
    Unload Form1
    It is OK to do this if you only expect one Form1 and Form2 to exist in your application, but there are better ways to handle forms in an MDI application if you want to learn them.

    Just reply back and someone can teach you.

    Regards
    Paul Lewis

  3. #3

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709
    Hi

    I am using an MDI application, and FORM1 and FORM2 are with property MDIChild = true, I want open the FORM2 from FORM1, but I want let it the FORM1 opened, but when I call the FORM2 It open e close and return to FORM1 , I want that the user click in button when He wanted close the FORM2

    thank you in advance

  4. #4
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Auckland, NZ
    Posts
    411

    YOu have an error then

    Not meaning to state the obvious, but if you are saying that the form2 opens, then closes immediately, it is clear to me that you have one of the following in your Form2 or Form1 code:

    Unload Form2
    Form2.Hide

    or one of the following in your Form2 code:
    Unload Me
    Me.Hide

    Look in the Form2_Load event and also in the code for the button on Form1 that the user clicks. If it's small enough, post the code or email me with it.

    As VB programmers, we talk a common language of VB so if you post code, we can understand you better. Your English is 1,000,000 times better than my Portuguese!

    Cheers
    Paul Lewis

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