pb_pfc_窗体居中
来源:互联网 发布:北京知金教育论坛 编辑:程序博客网 时间:2024/06/07 05:36
pfc中,窗体居中,可以直接使用窗体的服务,代码如下:
of_SetBase(True)inv_base.of_Center()十分简单。第一句启用窗体服务,第二句,调用服务的居中函数,如果不使用pfc,我们可以直接把of_Center函数拷贝出来,自己建一个函数用,代码如下:
Integerli_screenheightIntegerli_screenwidthIntegerli_rcIntegerli_x = 1Integerli_y = 1environmentlenv_obj//Check for a window association with this objectIf IsNull(iw_requestor) Or Not IsValid (iw_requestor) ThenReturn -1End If// Get environmentIf GetEnvironment (lenv_obj) = -1 ThenReturn -1End If// Determine current screen resolution and validateli_screenheight = PixelsToUnits (lenv_obj.screenheight, YPixelsToUnits!)li_screenwidth = PixelsToUnits (lenv_obj.screenwidth, XPixelsToUnits!)If Not (li_screenheight > 0) or Not (li_screenwidth > 0) ThenReturn -1End If// Get center pointsIf li_screenwidth > iw_requestor.Width Thenli_x = (li_screenwidth / 2) - (iw_requestor.Width / 2)End IfIf li_screenheight > iw_requestor.Height Thenli_y = (li_screenheight / 2) - (iw_requestor.Height / 2)End If// Center windowli_rc = iw_requestor.Move (li_x, li_y)
阅读全文
0 0
- pb_pfc_窗体居中
- javaSwing窗体居中显示
- swt设置窗体居中
- Java窗体居中显示
- VB让窗体居中
- swt设置窗体居中
- 弹出的窗体居中
- window.open()窗体居中
- Java Swing 窗体居中
- Delphi 窗体居中显示
- java窗体居中显示
- 窗体居中显示
- Flex 窗体居中
- c# 窗体应用 居中
- JFrame 窗体居中
- 让窗体居中
- JFrame窗体居中显示
- WPF窗体居中显示
- 如何打开.pdm文件(Mac OS X)
- 64-Minimum Path Sum
- 如何打开.qch文件
- Oracle定时备份
- idea groovy springboot start error
- pb_pfc_窗体居中
- 静默安装oracle 11g r2
- 射线和轴对齐包围盒相交检测-简洁算法(ray-aabb overlap test alogrithm)
- 最简单的基于FFmpeg的内存读写的例子:内存播放器
- 《深入探索C++对象模型》第三章:Data语意学
- 手机端 阅读 pdf 文件 touchPDF.js
- 编写第一个Python程序(向Python问个“Hello World“)
- dubbo-monitor 监控中心安装BUG处理
- VC加载初始化GDI+方法