Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    59

    Unanswered: Form in Front of Another Form

    OKay - I wrote a program in Access, and now I'm re-writing it in VB so I can distribute it. Anyway, I've got the MainForm (frmMain) opening, and it is basically the background for the rest of the program. It has some information that gets updated by the program periodically, so it is open, full screen and will be the "background" for my program.

    When the program runs, it fires off other forms, based on user input (selections from the main form). Here's my problem though, my other forms are coming up behind the main form. How do I place the other form in the background, or better yet, how do I open another form in front of the currently open form.

    I'm using the frmName.Show command to open the forms, but they keep opening in the background. How can I open these in the foreground? I'm a newbie. Any help would be great!

    Thanks so much!
    -Matt-
    -Matt H-
    www.comperfection.com

  2. #2
    Join Date
    Oct 2004
    Posts
    1

    Unhappy

    Quote Originally Posted by mateo107
    OKay - I wrote a program in Access, and now I'm re-writing it in VB so I can distribute it. Anyway, I've got the MainForm (frmMain) opening, and it is basically the background for the rest of the program. It has some information that gets updated by the program periodically, so it is open, full screen and will be the "background" for my program.

    When the program runs, it fires off other forms, based on user input (selections from the main form). Here's my problem though, my other forms are coming up behind the main form. How do I place the other form in the background, or better yet, how do I open another form in front of the currently open form.

    I'm using the frmName.Show command to open the forms, but they keep opening in the background. How can I open these in the foreground? I'm a newbie. Any help would be great!

    Thanks so much!
    -Matt-

    Ok I had the same problem in FoxPro for Windows and still don't have an answer . If you get one can you tell it to me?
    Thank you
    JWOLF468

  3. #3
    Join Date
    Feb 2004
    Posts
    59

    Talking answer

    After searching the internet for hours (literally) I finally found a post to solve this.

    I changed the code from:
    frmName.Show

    to:
    frmName.Show (modal), frmMain

    where frmName is the name of the form I want to show, and frmMain is the background form.

    So far that is working for me, but I do not know if that will work with other programs.

    Best of luck on your search!
    -Matt H-
    www.comperfection.com

  4. #4
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Since the MainForm will always be in the background, why don't you make it an MDI Form and make all the other forms MDI child forms? To do so create a new form (select MDI form), then change the MDIChild property in all the other forms to true.
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •