Private Sub Form_Paint()
Dim WidthOfBorder As Single ScaleMode = vbTwips WidthOfBorder = (Width - ScaleWidth) / 4 'assuming the progress bar is named ProgressBar1 and the 'status bar named StatusBar1, and placing the progress bar 'in panel 2 moving the progressbar to the statusbar and 'adjusting size ProgressBar1.Move StatusBar1.Panels(2).Left + 30, _ StatusBar1.Top + WidthOfBorder + 20, _ StatusBar1.Panels(2).Width - 50, _ StatusBar1.Height - WidthOfBorder - 30 'the values are hardcoded to allow the border to display 'to make the progressbar appear 3d and look smart. the 'progressbar may be hidden and replaced with text 'normally using the .panels().text property of the 'statusbar, as the progressbar is not actually in the 'statusbar, merely hovering above. End Sub Assumes: The progress bar must have it's Appearance property set to 0-ccFlat and its BorderStyle set to 0-ccNone, it may be located anywhere on the form. |