求一控件 放入窗体中,自动根据系统的分辨率调整控件的大小和位置 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你在from的resize里面写代码控制控件大小就可以解决问题! 如果每个FORM里写的话是可以,但是如果项目大的话就太麻烦了,以前我好象看到过,现在找不到了 resize事件Dim m as controlfor each m in me m.width = m.width*percent m.height = m.height*percentnext 我有控件,只要在Form里面的控件都能实现随分辨率变化、Form的大小变化而变化,但是如果是UserControl里面的控件就不可以:) Lixx_XIT你好,能不能发一个给我 [email protected] iloveyour(爱老虎油)发到你信箱了 Option ExplicitDim M_Width As DoubleDim M_Height As DoublePrivate Sub Form_Load() M_Width = Me.ScaleWidth M_Height = Me.ScaleHeight Me.Show End SubPrivate Sub Form_Resize() Dim Ctrl As Control Dim NewWidth As Double Dim NewHeight As Double Dim M_WPercent As Double Dim M_HPercent As Double On Error Resume Next NewWidth = Me.ScaleWidth NewHeight = Me.ScaleHeight M_WPercent = NewWidth / M_Width M_HPercent = NewHeight / M_Height M_Width = NewWidth M_Height = NewHeight For Each Ctrl In Me.Controls Ctrl.Left = Ctrl.Left * M_WPercent Ctrl.Width = Ctrl.Width * M_WPercent Ctrl.Top = Ctrl.Top * M_HPercent Ctrl.Height = Ctrl.Height * M_HPercent Next End Sub 日期值的查询 请教 如果不用存储过程,可以把下面的SQL语句在VB中来实现吗?请高手帮帮忙 一个建表问题 高分求题解(1/3)!!! 谁有VB的MSDN中文版的供下载啊? 不要笑~ 如何安排控件的TABINDEX 如何在VB中做打印功能(自己做一张表然后打印出来) picture框透明问题 结束程序的问题 有datagrid里,如何按表几种排序方式显示啊? C++ To VB activereport如何按组强制分页呢?
以前我好象看到过,现在找不到了
m.width = m.width*percent
m.height = m.height*percent
next
发到你信箱了
Dim M_Width As Double
Dim M_Height As DoublePrivate Sub Form_Load()
M_Width = Me.ScaleWidth
M_Height = Me.ScaleHeight
Me.Show
End SubPrivate Sub Form_Resize()
Dim Ctrl As Control
Dim NewWidth As Double
Dim NewHeight As Double
Dim M_WPercent As Double
Dim M_HPercent As Double On Error Resume Next
NewWidth = Me.ScaleWidth
NewHeight = Me.ScaleHeight
M_WPercent = NewWidth / M_Width
M_HPercent = NewHeight / M_Height
M_Width = NewWidth
M_Height = NewHeight
For Each Ctrl In Me.Controls Ctrl.Left = Ctrl.Left * M_WPercent
Ctrl.Width = Ctrl.Width * M_WPercent
Ctrl.Top = Ctrl.Top * M_HPercent
Ctrl.Height = Ctrl.Height * M_HPercent
Next
End Sub