当前位置: 代码迷 >> PB >> PB控件的resize函数!解决方法
  详细解决方案

PB控件的resize函数!解决方法

热度:32   发布时间:2016-04-29 09:59:09.0
PB控件的resize函数!
给你个通用函数,在窗口的OPEN事件中加句 f_resize_object(this)即可。
f_resize_object(window   va_window)
以下为内容:
//定义环境变量
environment   ve_hjbl
dec   vdec_width,vdec_height//宽度比率、高度比率
integer   vi_return//返回数值
long   vl_object
vi_return   =   GetEnvironment(ve_hjbl)
vdec_width   =   ve_hjbl.ScreenWidth   /   1024
vdec_height   =   ve_hjbl.ScreenHeight   /   768
any   vs_object_type

CheckBox   v_CheckBox
OLECustomControl   V_OLECustomControl
CommandButton   v_commandButton
Oval   v_Oval
DataWindow   v_datawindow
Picture   v_picture
DropDownListBox   v_DropDownListBox
PictureButton   v_PictureButton
DropDownPictureListBox   v_dropDownPictureListBox
PictureListBox   v_picTureListBox
EditMask   v_editmask
RadioButton   v_radiobutton
Graph   v_graph
Rectangle   v_rectangle
GroupBox   v_groupbox
RichTextEdit   v_richtextedit
HScrollBar   v_HScrollBar
RoundRectangle   v_RoundRectangle
Line   v_line
SingleLineEdit   v_SingleLineEdit
ListBox   v_ListBox
StaticText   v_statictext
ListView   v_listView
Tab   v_tab
MultiLineEdit   v_MultiLineEdit
TreeView   v_TreeView
OLEControl   v_OLEControl
VScrollBar   v_VSCrollBar
menu   v_menu
//调整窗口属性

va_window.x   =   va_window.x   *   vdec_width
va_window.y   =   va_window.y   *   vdec_height
//va_window.width   =   va_window.width   *   vdec_width
//va_window.height   =   va_window.height   *   vdec_height
va_window.Resize(va_window.width   *   vdec_width,va_window.height   *   vdec_height)

//处理窗口内对象
for   vl_object   =   1   to   upperBound(va_window.control[])
vs_object_type   =   va_window.control[vl_object].typeof()

------解决方案--------------------
MARK~~~~~~~
  相关解决方案