Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_messagebox Z-Order
#1
Is there a way to make sure a _messagebox  call will always be above other Windows.    It works as expected on Linux but on Windows sometimes the Z-order is behind the other window's (usually the console) and I'll have to bring it forward.      This isn't fatal to my application but it is annoying.
Reply
#2
Sometimes helps to call _AutoDisplay before calling _MessageBox.


Reply
#3
This is a Linux users two pence worth... I've not dabbled in Windows since XP.

Maybe going this route, and specifying MB_TOPMOST as part of the Type flags?

https://qb64phoenix.com/qb64wiki/index.p...essage_Box
Reply
#4
(03-22-2025, 10:27 PM)Petr Wrote: Sometimes helps to call _AutoDisplay before calling _MessageBox.

   I will try this first before I take a dive into Tantalus's suggestion.    Hopefully it will do it.   (Much less code to deal with).


Thank You.

(03-22-2025, 10:43 PM)tantalus Wrote: This is a Linux users two pence worth... I've not dabbled in Windows since XP.

Maybe going this route, and specifying MB_TOPMOST as part of the Type flags?

https://qb64phoenix.com/qb64wiki/index.p...essage_Box


 This does look like it will solve the problem.   I'll go this route if I have too,

Thank you.     I am going to try the previous suggestion and see if that works first.
Reply
#5
For me the box always stays in front.

Code: (Select All)

'Messageboxuebung - 23. Maerz 2025
'https://qb64phoenix.com/qb64wiki/index.php/MESSAGEBOX_(function)

Option _Explicit

Dim As Integer eingabe

'Sprungmarke
Nochmal:

Locate 3, 3
Input "Eine Zahl groesser 9 und kleiner 15: ", eingabe

Select Case eingabe
  Case 10 To 15
    Locate 5, 3
    Beep: Print "Korrekt"
  Case Else
    'Ungleich 1 bedeutet 0 fuer Abbrechen/Nein, oder 2 fuer Nein in yesnocancel
    If _MessageBox("Fehlermeldung", "Eingabe war falsch!", "okcancel", "error") <> 1 Then
      Cls
      GoTo Nochmal
    Else
      Beep: System
    End If
End Select

End
Reply




Users browsing this thread: 1 Guest(s)