This code will work assuming that "Me" is a form on which a control
called Panel1 exists.
If you wanted to manipulate the Panel from, say, another Button on
the same form, you'd need to get an object reference to the Panel
that the button can use. That's a little more involved, looking something
like (untested) :
Private Sub Button1_Click( _
ByVal sender as Object _
, ByVal e as Stystem.EventArgs _
) Handles Button1.Click
DirectCast( Me.FindForm, Form1 ).Panel1.Enabled = False
End Sub
HTH,
Phill W.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.