Hi,guys
how can I let a dialog always stay on the top?
just like variable MSG_STAYONTOP,but for Dialog
how can I let a dialog always stay on the top?
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 28
- Joined: Wed Jun 08, 2005 2:48 pm
Like this:
Dialog>Dialog1
Caption=Dialog1
Top=112
Width=226
Left=16
Height=103
Button=msButton1,32,32,75,25,0
EndDialog>Dialog1
Let>HWND_TOPMOST=-1
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>Flags={%SWP_NOSIZE% OR %SWP_NOMOVE%}
Show>Dialog1
LibFunc>user32,FindWindowA,hwnd,TForm,Dialog1
LibFunc>user32,SetWindowPos,r,hwnd,HWND_TOPMOST,0,0,0,0,Flags
CloseWindow>Dialog1
Show>Dialog1,r
Dialog>Dialog1
Caption=Dialog1
Top=112
Width=226
Left=16
Height=103
Button=msButton1,32,32,75,25,0
EndDialog>Dialog1
Let>HWND_TOPMOST=-1
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>Flags={%SWP_NOSIZE% OR %SWP_NOMOVE%}
Show>Dialog1
LibFunc>user32,FindWindowA,hwnd,TForm,Dialog1
LibFunc>user32,SetWindowPos,r,hwnd,HWND_TOPMOST,0,0,0,0,Flags
CloseWindow>Dialog1
Show>Dialog1,r
MJT Net Support
[email protected]
[email protected]