作者siaujan (...)
看板Visual_Basic
標題[.NET] 字串長度等於7就啟動另一視窗
時間Sat May 12 06:41:35 2007
我現在是以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)
推 retsamsu:Form.Load只有在Form開始的時候才有用... 05/12 10:56
→ retsamsu:你應該看看textbox的TextChanged event 05/12 10:56
推 siaujan:喔喔 成功了 感謝<(_ _)> 05/12 12:38