VB窗口数据初始化
本人正在做一个简易的软件,遇到一菜鸟问题:现有两个窗口,form1,form2,form1经过选择按钮后隐藏并进入form2(form2里有多个文本框输入数据),现for...
本人正在做一个简易的软件,遇到一菜鸟问题: 现有两个窗口,form1,form2,form1经过选择按钮后隐藏并进入form2(form2里有多个文本框输入数据),现form2有一个像新建一样的功能按钮,单击后实现,form1显示,form2隐藏,选择后再次进入form2,问题是怎样实现form2本来的数据以及像frame这些像一开始进入那样,没变化(文本框数据本来空的,frame的enable本来是ture),本人急等,忘高手速度告知~谢过
展开
2个回答
2013-11-06
展开全部
form1代码:Private Sub Command1_Click()
Me.Visible = False
Form2.Show
End SubPrivate Sub Form_Load()
Form2.Show
Form2.Visible = False
End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form2
End Sub
form2代码:Private Sub Command1_Click()
Me.Visible = False
Form1.Visible = True
End SubPrivate Sub Form_Load()End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form1
End Sub
以上是保持不变,如果要清空text1只要加上text1.text =""就行了
Me.Visible = False
Form2.Show
End SubPrivate Sub Form_Load()
Form2.Show
Form2.Visible = False
End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form2
End Sub
form2代码:Private Sub Command1_Click()
Me.Visible = False
Form1.Visible = True
End SubPrivate Sub Form_Load()End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form1
End Sub
以上是保持不变,如果要清空text1只要加上text1.text =""就行了
2013-11-06
展开全部
form1代码:Private Sub Command1_Click()
UNLOAD ME LOAD FORM2 Form2.Show
End SubPrivate Sub Form_Load()
Form2.Show
Form2.Visible = False
End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form2
End Sub
form2代码:Private Sub Command1_Click()
UNLOAD ME
LOAD FORM1FORM1.SHOW
End SubPrivate Sub Form_Load()End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form1
End Sub
这样就是初始化 重新载入一次就行了啊
UNLOAD ME LOAD FORM2 Form2.Show
End SubPrivate Sub Form_Load()
Form2.Show
Form2.Visible = False
End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form2
End Sub
form2代码:Private Sub Command1_Click()
UNLOAD ME
LOAD FORM1FORM1.SHOW
End SubPrivate Sub Form_Load()End SubPrivate Sub Form_Unload(Cancel As Integer)
Unload Form1
End Sub
这样就是初始化 重新载入一次就行了啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询