Announcement

Collapse
No announcement yet.

MSGBOX opens behind dialogs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MSGBOX opens behind dialogs

    My main dialog opens a second dialog for searching. When the user clicks Search, the callback first validates the data entry text boxes. A MSGBOX will come up if the user entered invalid search parameters. The MSGBOX is showing up behind the main window where it can't be seen. Can I get the box on top, or am I stuck with a DIALOG NEW for every possible error?
    Erich Schulman (KT4VOL/KTN4CA)
    Go Big Orange

  • #2
    Msgbox

    Perhaps adding: %MB_SYSTEMMODAL parameter will help.

    %MB_SYSTEMMODAL
    System Modal - Operates identically to %MB_APPLMODAL, except the MSGBOX is given the %WS_EX_TOPMOST style so that it remains above all other windows and dialogs.

    Comment


    • #3
      I have run across this but only(so far) when main window has the %WS_EX_TOPMOST style, which it rarely needs.
      Rod
      In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

      Comment


      • #4
        only guessing without sample code to demonstrate but are the 2 dialogs side by side? or a parent child? or a MDI variant? orrrrr????

        Had to ask
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment


        • #5
          Use the MessageBox API instead of the PB statement MSGBOX. I believe that the PB MsgBox uses the desktop as the parent window. The MessageBox API allows you to specify the parent window (i.e. your main dialog).
          Paul Squires
          FireFly Visual Designer (for PowerBASIC Windows 10+)
          Version 3 now available.
          http://www.planetsquires.com

          Comment


          • #6
            Originally posted by Rodney Hicks View Post
            I have run across this but only(so far) when main window has the %WS_EX_TOPMOST style, which it rarely needs.
            I found it there and got rid of it. All is well now
            Erich Schulman (KT4VOL/KTN4CA)
            Go Big Orange

            Comment


            • #7
              I've always felt an unsolicited "Always on Top" screen is rude.

              It's fine if you ask me if I want "always on top" and I say "yes" but a program doing it on its own, "no."
              Michael Mattias
              Tal Systems (retired)
              Port Washington WI USA
              [email protected]
              http://www.talsystems.com

              Comment


              • #8
                I have been known to use the %WS_EX_TOPMOST just to avoid that nuisance error that pops up when I recompile and haven't closed the app. But that's just my work around to make sure I pay attention. My short term memory being what it is.
                Rod
                In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                Comment

                Working...
                X