vb6.0中form1调用form2然后关闭form1并且form2显示在form1的位置上。
答案:1 悬赏:60 手机版
解决时间 2021-12-01 04:02
- 提问者网友:泪痣哥哥
- 2021-11-30 08:53
vb6.0中form1调用form2然后关闭form1并且form2显示在form1的位置上。
最佳答案
- 五星知识达人网友:三千妖杀
- 2021-11-30 09: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 SubForm2窗体的代码:
Private Sub Form_Load()
Me.Left = Form1.ll: Me.Height = Form1.hh
Me.Width = Form1.ww: Me.Top = Form1.tt
Unload Form1
End Sub运行图
二个窗体在一个位置,并且大小也一样。
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 SubForm2窗体的代码:
Private Sub Form_Load()
Me.Left = Form1.ll: Me.Height = Form1.hh
Me.Width = Form1.ww: Me.Top = Form1.tt
Unload Form1
End Sub运行图
二个窗体在一个位置,并且大小也一样。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯