![purebasic window api fullscreen purebasic window api fullscreen](https://abload.de/img/chmzqk66.jpg)
HDll = OpenLibrary(#PB_Any, "dwmapi.dll") Procedure GetWindowRectEx (hWnd, *tRECT.RECT) The workaround to get the real values seems to be to dynamically bind to dwmapi.dll, use GetProcAddress() to obtain the DwmGetWindowAttribute() function, and call it with the DWMWA_EXTENDED_FRAME_BOUNDS argument to request the genuine window frame dimensions.
![purebasic window api fullscreen purebasic window api fullscreen](https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/editor-views-and-modes/images/editor-fullscreenmode.png)
This appears to happen even in Aero Basic (without Glass) to retain sizing consistency. Under Vista/Win7 GetWindowRect_() will return a misleading set of values that do not account for the extra padding of "glass" pixels Aero applies to the window. You are using windows 7, and the problem I think it's caused by the fact PB get the size of the external frame of the window using GetWindowRect_() or something of that kind. While WaitWindowEvent() ! #PB_Event_CloseWindow :WendĬode: Select all Define x=WindowX(30,#PB_Window_FrameCoordinate) ResizeWindow(1,(x+w),y, #PB_Ignore, #PB_Ignore ) OpenWindow(30, 10, 550, 280, 70, "30",#PB_Window_SystemMenu)ĭefine x=WindowX(30,#PB_Window_FrameCoordinate)ĭefine y=WindowY(30,#PB_Window_FrameCoordinate)ĭefine w=WindowWidth(30,#PB_Window_FrameCoordinate)ĭefine h=WindowHeight(30,#PB_Window_FrameCoordinate) Macro ResizeWindow(Window,X,Y,Width,Height) ResizeWindow(1,x+5,y+5, #PB_Ignore, #PB_Ignore )
![purebasic window api fullscreen purebasic window api fullscreen](https://community.xibo.org.uk/uploads/default/optimized/2X/f/fe9b361fbdf60b9eb79289c667a241a8ddbe3028_2_1024x680.png)
ResizeWindow(1,x,y, #PB_Ignore, #PB_Ignore ) Procedure _ResizeWindow(Window,X,Y,Width,Height) If IsFlag(Window,#PB_Window_BorderLess) Or (GetWindowLongPtr_( WindowID(Window), #GWL_STYLE) ! 348127232) & Flag Code: Select all Macro IsFlag(Window, Flag)