I have a requirement that a datadialog always be in the foreground. >SetModal(true/false) doesn't work for me
Hello aurora baccio,
you can give your windows an order to show one of them always on top: SetWindowLong(MyWindow:Handle(), GWL_EXSTYLE, _OR(GetWindowLong(MyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
or with SetWindowPos() https://docs.microsoft.com/de-DE/windows/win32/api/winuser/nf-winuser-setwindowpos
HTH
Gerhard
Il giorno venerdì 24 giugno 2022 alle 12:04:44 UTC+2 Gerhard Bunzel ha scritto:
Hello aurora baccio,
you can give your windows an order to show one of them always on top:
SetWindowLong(MyWindow:Handle(), GWL_EXSTYLE, _OR(GetWindowLong(MyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles >>
or with SetWindowPos()
https://docs.microsoft.com/de-DE/windows/win32/api/winuser/nf-winuser-setwindowpos
HTH
Gerhard
Good morning,
sounds like the ideal command
but if I type setwindowpos(HWND_TOP) I get an error like the parameters are wrong.
Is it possible to have an example.
It was placed in the postinit method
thanks
aurora baccio
Il giorno venerdì 24 giugno 2022 alle 12:04:44 UTC+2 Gerhard Bunzel ha scritto:
Hello aurora baccio,
you can give your windows an order to show one of them always on top:
SetWindowLong(MyWindow:Handle(), GWL_EXSTYLE, _OR(GetWindowLong(MyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles >>
or with SetWindowPos()
https://docs.microsoft.com/de-DE/windows/win32/api/winuser/nf-winuser-setwindowpos
HTH
Gerhard
Good morning,
sounds like the ideal command
but if I type setwindowpos(HWND_TOP) I get an error like the parameters are wrong.
Is it possible to have an example.
It was placed in the postinit method
thanks
aurora baccio
SetWindowPos(SELF:Handle(),HWND_TOPMOST,0,0,0,0,SWP_NOMOVE+SWP_NOSIZE) should do this
Regards
Am 12.07.2022 um 16:06 schrieb aurora baccio:
Il giorno venerdì 24 giugno 2022 alle 12:04:44 UTC+2 Gerhard Bunzel ha scritto:
Hello aurora baccio,
you can give your windows an order to show one of them always on top:
SetWindowLong(MyWindow:Handle(), GWL_EXSTYLE, _OR(GetWindowLong(MyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
or with SetWindowPos()
https://docs.microsoft.com/de-DE/windows/win32/api/winuser/nf-winuser-setwindowpos
HTH
Gerhard
Good morning,
sounds like the ideal command
but if I type setwindowpos(HWND_TOP) I get an error like the parameters are wrong.
Is it possible to have an example.
It was placed in the postinit method
thanks
aurora baccio
SetWindowPos(SELF:Handle(),HWND_TOPMOST,0,0,0,0,SWP_NOMOVE+SWP_NOSIZE) should do this
Regards
Am 12.07.2022 um 16:06 schrieb aurora baccio:
Il giorno venerdì 24 giugno 2022 alle 12:04:44 UTC+2 Gerhard Bunzel ha scritto:
Hello aurora baccio,
you can give your windows an order to show one of them always on top:
SetWindowLong(MyWindow:Handle(), GWL_EXSTYLE, _OR(GetWindowLong(MyWindow:Handle(), GWL_EXSTYLE), WS_EX_TOPMOST))
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
or with SetWindowPos()
https://docs.microsoft.com/de-DE/windows/win32/api/winuser/nf-winuser-setwindowpos
HTH
Gerhard
Good morning,
sounds like the ideal command
but if I type setwindowpos(HWND_TOP) I get an error like the parameters are wrong.
Is it possible to have an example.
It was placed in the postinit method
thanks
aurora baccio
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 299 |
Nodes: | 16 (2 / 14) |
Uptime: | 52:02:24 |
Calls: | 6,690 |
Calls today: | 8 |
Files: | 12,225 |
Messages: | 5,344,716 |
Posted today: | 1 |