------ Form Load StatusBarPanel statusPanel = new StatusBarPanel(); 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 <table name>"); recordcount.Text = "Total Record : " + CountValue.ToString(); recordcount.ToolTipText = "Total Record"; recordcount.AutoSize = StatusBarPanelAutoSize.Spring; mainstatusbar.Panels.Add(recordcount); mainstatusbar.ShowPanels = true; this.Controls.Add(mainstatusbar); ------ Into Insert Block CountValue = Program.GetNumericValue("select count(*) as knt from <table name>");
recordcount.Text = "Total Record for : " + CountValue.ToString();<N.B : Program.GetNumericValue : only counting records which is connected with
database, nothing else>
I have applied below code for managing status bar panel. Need to inform that first applied onto MDI (Left side : User Name, Right Side : Date Time). After that I applied onto different form when i applied code into another form then showing two panel bar
into form. please help...