Forma eklemeniz gereken araç
1 Tane Button eklemeniz yeterli olacaktır.
Button'a çift tıklayın ve click olayına aşağıdaki kodları yazın
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a(4), b As String Dim c As Integer a(0) = InputBox("1.Metni Gir.") a(1) = InputBox("2.Metni Gir.") a(2) = InputBox("3.Metni Gir.") a(3) = InputBox("4.Metni Gir.") a(4) = InputBox("5.Metni Gir.") b = InputBox("Aramak istediğiniz kelimeyi lütfen girin.") For v = 0 To 4 If a(v) = b Then MsgBox("Aradığınız kelime var") c = c + 1 Exit For End If Next If c = 0 Then MsgBox("Aradığınız kelime yokı!") End If End Sub
Hiç yorum yok: