About StatusBar control in C# (Microsoft Visual Studio 2010)
Dear All
I am using Status Bar in my project.First applied onto MDI Form like user name and date. Second applied into another form where displayed number of entered records(total records). But it's showing two status bar panel. I don't know why. I am adding my code below.
---- Form load event
StatusBarPanel recordcount = new StatusBarPanel();
StatusBar mainstatusbar = new StatusBar();
int CountValue = 0;
recordcount.BorderStyle = StatusBarPanelBorderStyle.Raised;
recordcount.Width = 100;
CountValue = Program.GetNumericValue("select count(*) as knt from ROCVDS");
recordcount.Text = "Total Record for DS : " + CountValue.ToString();
recordcount.ToolTipText = "Total Record for DS";
recordcount.AutoSize = StatusBarPanelAutoSize.Spring;
mainstatusbar.Panels.Add(recordcount);
mainstatusbar.ShowPanels = true;
this.Controls.Add(mainstatusbar);
------ Insert records block
CountValue = Program.GetNumericValue("select count(*) as knt from <table name>");
recordcount.Text = "Total Record : " + CountValue.ToString();
N.B : GetNumericValue :- Only approaching like connect DB and retrieve data.