Hi Fred, I don't think that'll help, so here's a better example of what I need to do.
When you run this app, the button's height resizes to match the window height. Then, you click the button and the height changes of the window and the button changes. However, the window height MUST stay above the taskbar at all times! So when the window and button are small, and you resize the taskbar higher, and then click the button, the window must resize to stay at the top of the screen and above the taskbar.
Code: Select all
; Works perfectly with 5.51
; Totally dead with 5.60 Beta
OpenWindow(0,10,10,600,0,"test",#PB_Window_SystemMenu|#PB_Window_SizeGadget)
CreateStatusBar(0,WindowID(0))
AddStatusBarField(#PB_Ignore)
StatusBarText(0,0,"Hello")
Global statusheight=StatusBarHeight(0)
Global bigwindow=1
ButtonGadget(0,10,10,580,0,"Click this button to toggle size")
Procedure SetWindowSize()
bigwindow=1-bigwindow
GetWindowRect_(FindWindow_("Shell_TrayWnd",0),taskwin.RECT)
taskheight=taskwin\bottom-taskwin\top
screenheight=GetSystemMetrics_(#SM_CYSCREEN)
If bigwindow=0
ResizeWindow(0,10,10,600,100)
ResizeGadget(0,#PB_Ignore,#PB_Ignore,#PB_Ignore,WindowHeight(0)-45)
Else
ResizeWindow(0,10,10,600,screenheight-taskheight-(statusheight*2.5))
ResizeGadget(0,#PB_Ignore,#PB_Ignore,#PB_Ignore,WindowHeight(0)-45)
EndIf
EndProcedure
SetWindowSize()
Repeat
Event=WaitWindowEvent()
If Event=#PB_Event_Gadget
SetWindowSize()
EndIf
Until Event=#PB_Event_CloseWindow