hi AC
i think your suggestion might work
this is what i have in mind also
if i make it GLOBAL (as you suggested), then i don't have to recreate the object everytime
i will give this code a try after i woke up
it is about 4 a.m. my time zone now
betta catch some zzzzzzzzzzz
thanks for all the help
Ad
----- Aravind C wrote: ----
Hi Ada
Actually, you must make the statusbar and its panels as _instance fields
of the Form so that the form can access them from any method
The windows form designer should automatically do this for you once yo
drag and drop a status bar from the toolbox into the form
public class MyForm : System.Windows.Forms.For
private System.Windows.Forms.StatusBar statusBar1
private System.Windows.Forms.StatusBarPanel statusBarPanel1
private void InitializeComponent(
this.statusBar1.Location = new System.Drawing.Point(0, 328)
this.statusBar1.Name = "statusBar1"
this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[
this.statusBarPanel1})
this.statusBar1.ShowPanels = true
this.statusBar1.Size = new System.Drawing.Size(672, 22)
this.statusBar1.TabIndex = 2
this.statusBar1.Text = "statusBar1"
this.statusBarPanel1.BorderStyle
System.Windows.Forms.StatusBarPanelBorderStyle.Raised
this.statusBarPanel1.Text = "Ready...."
this.statusBarPanel1.ToolTipText = "Test"
// ...
// Update the status panel's tex
private void button1_Click(object sender, System.EventArgs e
this.statusBarPanel1.Text = "Button clicked..."
Regards
Aravind
Ada said:
hi AC
i was thinking because the code, although it's the same, appear twice i
different method, C# compiler would do all the clean up automatically
no go
code doesn't even compile
err msg
C:\Form1.cs(694): The type or namespace name 'panel1' could not be foun
(are you missing a using directive or an assembly reference?the LOAD FORM method but it got destroyed when it exited LOAD FORM
when i click on another method which contained the same code, it looks fo the INSTANCE
in this case, of course, i think it's out of scope
this is the reason why i added all enchilada again
obvioulsy, something didn't go as plan
before create the new instance in the new method