Thursday, December 15, 2011

Visible Enabled

1. Make an interface like this ti notice the trick.



2. The code..

Public Class frm2

Private Sub VisibleEnabled_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub

Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click

TextBox.Visible = False
End Sub

Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2.Click

TextBox.Visible = True
TextBox.Text = "I am here."
TextBox.Enabled = True
End Sub

Private Sub btn3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn3.Click

TextBox.Visible = True
TextBox.Text = "I am enabled."
TextBox.Enabled = True
End Sub

Private Sub btn4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn4.Click

TextBox.Enabled = False
TextBox.Text = "I am disabled."
End Sub

Private Sub TextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox.TextChanged
End Sub

Private Sub backtoindex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles backtoindex.Click

Me.Close()
End Sub

End Class

3. Save & Run the program.

No comments:

Post a Comment