vb6.0中form1调用form2然后关闭form1并且form2显示在form1的位置上。
1个回答
2016-04-12
展开全部
Form1窗体的代码:
Public ll As Single, hh As Single, ww As Single, tt As Single
Private Sub Command1_Click()
Form2.Show
End Sub
Private Sub Form_Load()
ll = Me.Left: hh = Me.Height
ww = Me.Width: tt = Me.Top
End Sub
Form2窗体的代码:
Private Sub Form_Load()
Me.Left = Form1.ll: Me.Height = Form1.hh
Me.Width = Form1.ww: Me.Top = Form1.tt
Unload Form1
End Sub
运行图
二个窗体在一个位置,并且大小也一样。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询