5
Contributors
5
Replies
7
Views
5 Years
Discussion Span
Last Post by cheesepotato
0

You can declare a private boolean variable and a public property like so:

Private buttonEnabled As Boolean = True

Public Property EnableButton As Boolean
    Get
        Return Me.buttonEnabled
    End Get
    Set(value As Boolean)
        Me.buttonEnabled = value
    End Set
End Property

Then in the form's load event handler place the following code:

buttonBeingManipulated.Enabled = buttonEnabled

To change the value create a new instance of the value on the form you are sending the command from:

    Dim f99 as New Form99

    f99.EnableButton = False
    'The button will be disabled'
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.