Dynamically Create Checkbox in windows application


Dynamically Create Checkbox in windows application

Dynamically Create Checkbox in windows application?
Abstract:-
Just create object for checkbox then bind this object in form.

Example


Public Class Form1
Dim chk As New CheckBox
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
chk.Name = "chk1"
chk.Checked = True
AddHandler chk.CheckedChanged, AddressOf chk_CheckedChanged
Me.Controls.Add(chk)
End Sub
Sub chk_CheckedChanged()
If chk.Checked = True Then
MsgBox("Checkbox is True")
Else
MsgBox("Checkbox is False")
End If
End Sub
End Class


Related Articles

Write a Console Application for beginners

.NET framework contains Console application,Windows applications usually called as Win Apps,Web applications,Mobile applications,Web Services.Let us know how to write a simple Hello World using Console Application in the Visual Studio.NET framework tool 2008.

More articles: Windows application CheckBox

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: