Activating Program from Running Programs List

Discussion in 'Questions (Windows Mobile)' started by mikewhite, Sep 21, 2008.

  1. mikewhite

    mikewhite Member Licensed User

    Hi,

    some while ago I asked how to stop each window from getting its own entry in the "Running Programs" list from System/Memory/Running Programs.
    I was advised to set hidden form's captions to "" which works just fine. However, if I use the Activate button on the Running Programs window, my application appears, BUT when I close(hide) the form via the OK button top right, my app hides and I get the Running Program list back. Is there anyway to keep my app. "on top"?

    Thanks

    Mike White
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    What do you mean with keeping your app "on top"?
     
  3. mikewhite

    mikewhite Member Licensed User

    What I mean is this:

    Say I have a program with two forms, frrmMain and frmChild.
    The main (first) form is frmMain. From that first form the user takes some action to show frmChild. As suggested, I set the Caption of frmMain to "" to stop it showing in the Running Programs list. If the user, while frmChild is showing, goes to Settings/Memory,Running Programs and selects the program and presses Activate, the program appears. But when they "close" frmChild, rather than frmMain re-appearing, the Running Programs list appears over the top. This just seems wrong from a user's point of view?

    Thanks

    Mike
     
  4. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Within the closing event of the child form you need to set the Focus to the main Form.
    This should bring it to the front rather than showing any over windows that have been opened in the mean time.

    Regards,
    RandomCoder
     
  5. Cableguy

    Cableguy Expert Licensed User

    You should also be sure to set the IsMDIparent property of the main form to TRUE...This sould make that all MDI form are shown within the bounds of the main form, and when closed, return the focus to the main form...
    All This, assuming you are using Agraham's FormExDesktop dll, as you talk about mdi forms wich is not an B4PPC native property...
     
  6. mikewhite

    mikewhite Member Licensed User

    Hi,

    thanks for the replies, will try out soon the setting of focus to the main form.
    Cableguy, no its not mdi, its device based - so I can't try your suggestions.

    Mike
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Another thing you can do is to call frmMain.Show inside Sub frmChild_Close.
     
  8. mikewhite

    mikewhite Member Licensed User

    Thanks all. Calling frmmain.focus works nicely. Another lesson learned!

    Mike
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice