Re: The variable 'controlname' is either undeclared or was never assigned.
From: CJ Taylor ([cege])
Date: 04/20/04
- Next message: Armin Zingler: "Re: Newline in Text Property"
- Previous message: CJ Taylor: "Re: Casting Data.Datarow to a strongly typed datarow"
- In reply to: mros: "The variable 'controlname' is either undeclared or was never assigned."
- Next in thread: mros: "Re: The variable 'controlname' is either undeclared or was never assigned."
- Reply: mros: "Re: The variable 'controlname' is either undeclared or was never assigned."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Apr 2004 13:04:28 -0500
You really really really don't want to declare your controls shared, I don't
even want to think of the consequences with that (because the design of MDI
afterall is many instances of the same child form, i.e. Microsoft Word).
If your MDI Parent is in the same namespace as your MDI Children, then you
should just be able to access them without a problem through the
instantiated class
i.e.
dim myForm1 as new MyForm()
myForm1.buttonOk.Enabled = False
myForm.MdiParent = me
myForm1.Show()
if you still can't access them, try declaring your controls Public. Thats
the modifier property in your property grid.
HTH,
CJ
"mros" <malisros@yahoo.com> wrote in message
news:%23gaFx9vJEHA.752@tk2msftngp13.phx.gbl...
> I've created three buttons on a form (IsMdiContainer=True), it's mdi
parent.
> I need to disable these buttons from one of my child form. So,
> I've changed these buttons modifier to Friend Shared WithEvents
> 'controlname' as System.Windows.Forms.button
> and I was able to disable these buttons from my child form.
>
> The problem is when I load the form in the form designer. It gives
> me this error: "The variable 'controlname' is either undeclared or was
> never assigned."
>
> Anyone? Help...Thanks!
>
>
- Next message: Armin Zingler: "Re: Newline in Text Property"
- Previous message: CJ Taylor: "Re: Casting Data.Datarow to a strongly typed datarow"
- In reply to: mros: "The variable 'controlname' is either undeclared or was never assigned."
- Next in thread: mros: "Re: The variable 'controlname' is either undeclared or was never assigned."
- Reply: mros: "Re: The variable 'controlname' is either undeclared or was never assigned."
- Messages sorted by: [ date ] [ thread ]