Click here to Skip to main content
16,005,316 members
Home / Discussions / C#
   

C#

 
Generalopen shared folder Pin
elite2k18-Feb-04 5:35
elite2k18-Feb-04 5:35 
GeneralRe: open shared folder Pin
CWIZO18-Feb-04 6:56
CWIZO18-Feb-04 6:56 
GeneralRe: open shared folder Pin
Heath Stewart18-Feb-04 10:20
protectorHeath Stewart18-Feb-04 10:20 
GeneralRe: open shared folder Pin
Heath Stewart18-Feb-04 10:24
protectorHeath Stewart18-Feb-04 10:24 
GeneralRe: open shared folder Pin
elite2k18-Feb-04 21:49
elite2k18-Feb-04 21:49 
GeneralRe: open shared folder Pin
Heath Stewart19-Feb-04 3:48
protectorHeath Stewart19-Feb-04 3:48 
GeneralProgressBar into StatusBar Pin
Weiye Chen18-Feb-04 4:29
Weiye Chen18-Feb-04 4:29 
GeneralRe: ProgressBar into StatusBar Pin
Heath Stewart18-Feb-04 4:51
protectorHeath Stewart18-Feb-04 4:51 
Yes. First, make sure that StatusBar.ShowPanels is true, and add your panels. To make things easier, make your panel that will host the ProgressBar fixed-width (this is common in most apps beside).

Next, handle the StatusBar.DrawItem event. Your event handler should look something like the following (assume statusBar1 is your StatusBar, and progressBar1 is your ProgressBar):
private void statusBar1_DrawItem(object sender, StatusBarDrawItemEventArgs e)
{
  Rectangle bounds = e.Bounds;
  // Adjust bounds to better fit the panel depending on 3d borders, grips, etc.
  bounds.Y = statusBar1.Top + SystemInformation.Border3DSize.Height;
  bounds.Height += SystemInformation.BorderSize.Height * 2;
  bounds.X -= SystemInformation.BorderSize.Width;
  if (statusBar1.SizingGrip && ((Form)statusBar1.Parent).WindowState ==
    FormWindowState.Maximized)
    bounds.Width += SystemInformation.VerificationScrollBarWidth;
  progressBar1.Bounds = bounds;
}
This works, though there might be more elegant solutions you could search for.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: ProgressBar into StatusBar Pin
Weiye Chen27-Feb-04 17:53
Weiye Chen27-Feb-04 17:53 
GeneralRe: ProgressBar into StatusBar Pin
Heath Stewart28-Feb-04 3:30
protectorHeath Stewart28-Feb-04 3:30 
GeneralRe: ProgressBar into StatusBar Pin
Weiye Chen28-Feb-04 3:58
Weiye Chen28-Feb-04 3:58 
GeneralAsyncronous Remoting... Pin
Blue_Aqua18-Feb-04 0:53
Blue_Aqua18-Feb-04 0:53 
GeneralRe: Asyncronous Remoting... Pin
Heath Stewart18-Feb-04 4:40
protectorHeath Stewart18-Feb-04 4:40 
GeneralRe: Asyncronous Remoting... Pin
Blue_Aqua18-Feb-04 17:48
Blue_Aqua18-Feb-04 17:48 
GeneralRe: Asyncronous Remoting... Pin
Guillermo Rivero18-Feb-04 7:53
Guillermo Rivero18-Feb-04 7:53 
GeneralRe: Asyncronous Remoting... Pin
Blue_Aqua18-Feb-04 18:43
Blue_Aqua18-Feb-04 18:43 
GeneralMDI problems Pin
ASGill18-Feb-04 0:24
ASGill18-Feb-04 0:24 
GeneralRe: MDI problems Pin
Weiye Chen18-Feb-04 4:16
Weiye Chen18-Feb-04 4:16 
GeneralDoubleClikc Event of ComboBox Pin
Itanium17-Feb-04 23:40
Itanium17-Feb-04 23:40 
GeneralRe: DoubleClikc Event of ComboBox Pin
Heath Stewart18-Feb-04 4:38
protectorHeath Stewart18-Feb-04 4:38 
QuestionHow to work around screensaver?? Pin
mdundek17-Feb-04 22:06
mdundek17-Feb-04 22:06 
AnswerRe: How to work around screensaver?? Pin
Heath Stewart18-Feb-04 4:31
protectorHeath Stewart18-Feb-04 4:31 
GeneralRe: How to work around screensaver?? Pin
mdundek18-Feb-04 6:32
mdundek18-Feb-04 6:32 
GeneralSin graphic algorithm Pin
Anonymous17-Feb-04 20:09
Anonymous17-Feb-04 20:09 
GeneralRe: Sin graphic algorithm Pin
Colin Angus Mackay17-Feb-04 22:01
Colin Angus Mackay17-Feb-04 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.