T TomislaW Feb 13, 2004 #1 How can I enable/disable button on mdi parent form when I click on some control in activ child form?
H Herfried K. Wagner [MVP] Feb 13, 2004 #2 * "TomislaW said: How can I enable/disable button on mdi parent form when I click on some control in activ child form? Click to expand... \\\ DirectCast(Me.MdiParent, MainForm).Button1.Enabled = False ///
* "TomislaW said: How can I enable/disable button on mdi parent form when I click on some control in activ child form? Click to expand... \\\ DirectCast(Me.MdiParent, MainForm).Button1.Enabled = False ///
T TomislaW Feb 16, 2004 #3 I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; I can not access Button1 in parent
I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; I can not access Button1 in parent
T TomislaW Feb 16, 2004 #4 when I declare button of parent form as public I get: "An unhandled exception of type 'System.InvalidCastException' occurred in xy.exe" Additional information: Specified cast is not valid. TomislaW said: I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; I can not access Button1 in parent Click to expand...
when I declare button of parent form as public I get: "An unhandled exception of type 'System.InvalidCastException' occurred in xy.exe" Additional information: Specified cast is not valid. TomislaW said: I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; I can not access Button1 in parent Click to expand...
H Herfried K. Wagner [MVP] Feb 16, 2004 #5 * "TomislaW said: I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; Click to expand... \\\ ((Form1)this.MdiParent).btnNew.Enabled = false; ///
* "TomislaW said: I work in C# and I wrote ((Form1)this.Parent).btnNew.Enabled = false; Click to expand... \\\ ((Form1)this.MdiParent).btnNew.Enabled = false; ///
T TomislaW Feb 16, 2004 #6 yes, thanks for that! Herfried K. Wagner said: \\\ ((Form1)this.MdiParent).btnNew.Enabled = false; /// Click to expand...
yes, thanks for that! Herfried K. Wagner said: \\\ ((Form1)this.MdiParent).btnNew.Enabled = false; /// Click to expand...