Use a property or pass the form with the label you want to change to the
form where you want to change it from
for example call the form used to change the label from the form with the
label:
'First give the second form a new constructor + a var to hold the form
that's passed:
Private Caller As Form1
Public Sub New(ByVal myCaller As Form)
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeCompo nent()
'Add any initialization after the InitializeCompo nent() call
Caller = DirectCast(myCa ller, Form1)
End Sub
'Then in the form with label pass the form to the second forms' constructor
dim obj as new frmUsedToChange (me)
obj.show
'in the second form to change the label
Caller.Label1.T ext = "I'm freaking changed ;-)"
hth Peter
"Roger Ries via DotNetMonster.c om" <fo***@DotNetMo nster.com> schreef in
bericht news:1a******** *************** *******@DotNetM onster.com...
I'm trying to change the text in a label from another form.
lblInfo.Text = "ABC"
Works for the form your currently in but how the heck do you change that
label information from another form.
Later
--
Message posted via http://www.dotnetmonster.com