[.NET] 字串長度等於7就啟動另一視窗
我現在是以Form1當登入畫面,
希望從TextBox1輸入7個數字,不用按按鈕就自動跳到Form3
下面是我的程式,不知道是錯在哪,輸入完還是不會動..囧
還請高人指點<0>
ps.我目前是設定兩個Form同時開啟,但Form3預設不能動作, 等輸入完畢才能操作
=========================================================================
Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim inp As Integer
inp = Len(TextBox1.Text)
f3 = New Form3()
f3.Show()
f3.Enabled = False
If inp = 7 Then
f3.Enabled = True
Me.Hide()
Else
End If
End Sub
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.113.1.216
※ 編輯: siaujan 來自: 59.113.1.216 (05/12 06:45)
推
05/12 10:56, , 1F
05/12 10:56, 1F
→
05/12 10:56, , 2F
05/12 10:56, 2F
推
05/12 12:38, , 3F
05/12 12:38, 3F