PowerBuilder窗口全屏显示的问题

ndboy1016 2006-11-06 10:25:30
把下列声明加到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)
但是还是不能全部满屏?下面还有一点。
...全文
486 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
tdtxflsh 2006-11-06
  • 打赏
  • 举报
回复
environment lenv_env // holds environment information
integer li_origX,li_origY,li_envX,li_envY
integer li_scaleX,li_scaleY

// Get the environment information
if ( GetEnvironment(lenv_env) <> 1 ) then
MessageBox( "Application: Open", &
"Unable to get environment information.~nHalting ..." )
halt
end if
//Get the Screen's Width and Height (unit:pixel)
li_envX = lenv_env.ScreenWidth
li_envY = lenv_env.ScreenHeight
//Get the P_1 picture's Width and Height (unit:pixel)
li_origX = UnitsToPixels(2400, XUnitsToPixels!)
li_origY = UnitsToPixels(1800, YUnitsToPixels!)
//
dashi 2006-11-06
  • 打赏
  • 举报
回复

401

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧