Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleBind controls' properties to each other in VB .NET
DescriptionThis example shows how to bind controls' properties to each other in VB .NET.
Keywordsbinding, data binding, VB.NET, DataBinding, properties, property
CategoriesDatabase, VB.NET, Controls
 
This program contains a CheckBox and a GroupBox that contains some Labels and TextBoxes. When the form loads, the program executes a single statement that adds a DataBinding to bind the GroupBox's Enabled property to the CheckBox's Checked property. When the user changes the value of the Checked property, the DataBinding automatically changes the value of the GroupBox's Enabled property. That means the user can enable and disable the GroupBox by clicking on the CheckBox.
 
Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
    e As System.EventArgs) Handles MyBase.Load
    GroupBox1.DataBindings.Add("Enabled", chkEnabled, _
        "Checked")
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated