PowerBuilder窗口全屏显示的问题
把下列声明加到GLOBAL EXTERNAL FUNCTIONS:
Function ulong SetWindowPos(ulong hwnd,ulong hWndInsertAfter,ulong x,ulong y,ulong cx,ulong cy,ulong wFlags) LIBRARY "user32.dll"
Function ULong SetWindowLongA(Long hwnd, Long nIndex, Long dwNewLong) Library 'user32.dll'
Function ULong GetWindowLongA(Long hwnd, Long nIndex) Library 'user32.dll'
把下列代码加到W_FRAME窗口(即MDI窗口)的OPEN事件:
//满屏显示
Environment env
GetEnvironment(env)
THIS.Resize(PixelsToUnits(env.ScreenWidth,XPixelsToUnits!), &
+ PixelsToUnits(env.ScreenHeight,YPixelsToUnits!))
THIS.Move(0,0)
//去掉标题栏
long dwStyle
dwStyle = GetWindowLongA(handle(this), -16)
dwStyle = dwStyle - 12582912
dwStyle = SetWindowLongA(handle(this), -16, dwStyle)
SetWindowPos(handle(this), -2, 0, 0, 0, 0, 39)
但是还是不能全部满屏?下面还有一点。