如何在VB .net中读取txt文件中的一行,并将数据赋值给不同的变量? 20
1个回答
展开全部
Private Sub Command3_Click()
If Text1.Text = Text2.Text And Text1.Text <> "" And Text2.Text <> "" Then
Open "c:\text.ini" For Output As #1
Print #1, Text1.Text
Close
Form1.Visible = False
Form2.Show
Else
MsgBox "密码不一样", 17, "重输入相同的密码"
Text1.SetFocus
Text2.SetFocus
End If
End Sub
Private Sub Form_Load()
Dri = "c:\"
If Dir(Dri & "text.ini") = "" Then
Text1.Visible = True '密码输入
Text2.Visible = True '密码输入
Command3.Visible = True '密码确认键
Else
Form1.Visible = flase '新密码区关闭
Form2.Show '输入密码取打开
End If
End Sub
If Text1.Text = Text2.Text And Text1.Text <> "" And Text2.Text <> "" Then
Open "c:\text.ini" For Output As #1
Print #1, Text1.Text
Close
Form1.Visible = False
Form2.Show
Else
MsgBox "密码不一样", 17, "重输入相同的密码"
Text1.SetFocus
Text2.SetFocus
End If
End Sub
Private Sub Form_Load()
Dri = "c:\"
If Dir(Dri & "text.ini") = "" Then
Text1.Visible = True '密码输入
Text2.Visible = True '密码输入
Command3.Visible = True '密码确认键
Else
Form1.Visible = flase '新密码区关闭
Form2.Show '输入密码取打开
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询