我需要創建一個程序,可以搜索用戶想要搜索的字母。用戶將在TextBox中寫下一些內容,當他/她按下搜索時,輸入框會出現,要求他在輸入框上寫一個字母。程序會告訴你有很多時間該字母出現在文本框中。這是我到目前爲止有:我不知道如何使用循環和計數器
Public Class Form1
Private Sub BtnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClear.Click
TxtboxInput.Clear()
End Sub
Private Sub BtnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnQuit.Click
Me.Close()
End Sub
Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch.Click
Dim intStartIndex As Integer
Dim intFoundIndex As Integer
Dim counter = 0
Dim hitcounter = 0
Dim blnFlag = True
Try
InputBox(" Enter Letters", "Input Needed")
Catch
End Try
End Sub
End Class
你想如何使用循環和計數器? – viclim
你想從哪裏搜索和輸入框是什麼?請清楚地寫下你的問題 – Kasnady
直到和計數器= +1 – user2189046