[转帖]PB设计窗口按比例缩放
<p>1.实例变量:Int ii_width,ii_height<br/><br/><br/>2.OPEN事件加入:<br/><br/>ii_width = This.Width<br/>ii_height = This.Height<br/><br/><br/>3.<br/><br/>在RESIZE事件中加入:<br/>Int li_value<br/>DragObject lw_obj<br/>For li_value = 1 To UpperBound(This.Control[])<br/> lw_obj = control<br/> lw_obj.x = lw_obj.x * (NewWidth / ii_width)<br/> lw_obj.width = lw_obj.width * (NewWidth / ii_width)<br/> lw_obj.y = lw_obj.y * (NewHeight / ii_height)<br/> lw_obj.height = lw_obj.height * (NewHeight / ii_height)<br/>Next<br/>ii_width = NewWidth<br/>ii_height = NewHeight<br/><br/>可以了!!</p><p>原来不是很麻烦~~自己却一直没有搞定</p>
页:
[1]