[Solved] Resize and move window before unhiding?
Posted: Tue Apr 10, 2018 9:07 am
I'd like to set the position of a window before unhiding it, but this doesn't seem to be possible. Is this correct?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
EnableExplicit
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_Invisible)
ResizeWindow(0, 100, 100, #PB_Ignore, #PB_Ignore)
HideWindow(0, 0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Code: Select all
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_Invisible)
ResizeWindow(0, 100, 100, 200,200)
;SetWindowPos_(WnidowID(0),#HWND_NOTOPMOST,100,100,200,200,#SWP_NOREDRAW)
Debug "hidden ?"
Delay(1000)
HideWindow(0, 0)
Debug "visible"
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIfCode: Select all
;SetWindowPos_(WnidowID(0),#HWND_NOTOPMOST,100,100,200,200,#SWP_NOREDRAW)Code: Select all
SetWindowPos_(WindowID(0),#HWND_NOTOPMOST,100,100,200,200,#SWP_NOREDRAW)
You can definitely resize and move a window before unhiding it, yes. I've been doing it for years.Michael Vogel wrote:I will add [Solved] the topic name even when this miracle will never be solved.