1)
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Pass As Boolean
For I = 0 To 500
'Based in the I index you can tell if pass is true or false
If I = 12 Then
Pass = True
End If
If Pass = True Then
'Do something here
End If
Next
End Sub
End Class
2)
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Pass As Boolean
For I = 0 To 500
'Based in the I index you can tell if pass is true or false
If I = 12 Then
Pass = True
End If
If Pass = True Then
'Do something here
End If
Next
TextBox1.Text = "Try Try Try"
End Sub
End Class
3)
Code:
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "Quit" Then
RichTextBox1.Text = "Are you sure ? (Y/N)"
End If
End Sub
Private Sub RichTextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RichTextBox1.MouseClick
RichTextBox1.Clear()
End Sub
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
If RichTextBox1.Text = "Y" Or RichTextBox1.Text = "y" Then
'Do something
End If
If RichTextBox1.Text = "N" Or RichTextBox1.Text = "n" Then
'Do something
End If
End Sub
End Class