Here's some code which uses swearing.
Code:Option Explicit ' Declares and Consts and Subs from other thread go here Private Sub Form_Resize() Dim nPanel As Long Dim tRC As RECT nPanel = 5 ' 6th panel. (Set it to the panel number, minus one) Call SendMessageAny(MyStatusBar.hWnd, SB_GETRECT, nPanel, tRC) With tRC .Top = ScaleY(.Top, vbPixels, ScaleMode) .Left = ScaleX(.Left, vbPixels, ScaleMode) .Bottom = ScaleY(.Bottom, vbPixels, ScaleMode) - .Top .Right = ScaleX(.Right, vbPixels, ScaleMode) - .Left Call MyProgressBar.Move(.Left, .Top, .Right, .Bottom) End With End Sub





Reply With Quote