Do I have the GoSub>StayOnTop,Dialog1.Handle in the right place? as well as the SRT>StayOnTop?
Code: Select all
WriteLn>C:\Temp\Reboot.txt,result,NO
Dialog>Dialog1
....DIALOG DETAILS MINAMIZED...
EndDialog>Dialog1
GoSub>StayOnTop,Dialog1.Handle
AddDialogHandler>Dialog1,MSButton1,OnClick,DoClick(1)
Show>Dialog1,res1
SRT>StayOnTop
Let>HWND_TOPMOST=-1
Let>HWND_NOTOPMOST=-2
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>SWP_NOACTIVATE=16
Let>SWP_SHOWWINDOW=64
Let>WindowHandle=%StayOnTop_var_1%
Let>Flags={%SWP_NOACTIVATE% Or %SWP_SHOWWINDOW% Or %SWP_NOMOVE% Or %SWP_NOSIZE%}
LibFunc>User32,SetWindowPos,swpr,%WindowHandle%,HWND_TOPMOST,0,0,0,0,Flags
END>StayOnTop
SRT>DoClick
SetDialogProperty>Dialog1,Edit2,Text,Restart in progress...
Message>The system is going to Log off now. Please wait 90 secs before you remote back in to th system.
wait>3
END>DoClick