本帖最后由 Flyingdancing 于 2012-8-17 14:05 编辑
- Public lft As Double
- Public tp As Double
- Sub memo()
- Dim x As UserForm1
- Set x = UserForm1
- lft = x.Left
- tp = x.top
- Debug.Print lft, tp; x.Left; x.top
- End Sub
- Sub disp()
- Dim x As UserForm1
- Set x = UserForm1
- x.Left = lft
- x.top = tp
- Debug.Print lft, tp; x.Left; x.top
- End Sub
按钮内容:- Private Sub CommandButton1_Click()
- 模块1.memo
- UserForm1.Hide
- UserForm1.Show 0
- 模块1.disp
- End Sub
这时候,窗体位置是正确的。但是!!!屏幕会闪!!从中心位置移动到设定位置的闪屏!!- Private Sub CommandButton1_Click()
- 模块1.memo
- UserForm1.Hide
- 模块1.disp
- UserForm1.Show 0
- End Sub
这时候,不闪了!但是位置不变……!!为什么提前设定Left和Top值无效……,难道不保存这俩值么……
CAD你是要闹哪样啊…… |