PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: Accesing StatusBar
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: Accesing StatusBar
![]() |
Re: Accesing StatusBar |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I need in C# please.
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
> I need in C# please.
If you used the designer you will find that the StatusBar member of your MDI parent form is private i.e.: public class MainForm : System.Windows.Forms.Form { private System.Windows.Forms.StatusBar statusBar1; .... so you want to add an accessor to MainForm to expose it public StatusBar MainFormStatusBar { get {return statusBar1 ;} } then from a MDI child form you can just get hold of it by doing: MainForm mainForm = (MainForm) this.MdiParent ; StatusBar sb = mainForm.MainFormStatusBar ; which you can shorten to StatusBar sb = ((MainForm) this.MdiParent).MainFormStatusBar ; if you prefer HTH, Ian Cooper wwww.dnug.org.uk |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

