Я пробую вот так, но не выходит:
- Код: Выделить всё
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const PBM_SETRANGE = &H400 + 1
'пытаюсь установть диапазон
Dim lRng As Long, lMin as Long, lMax as Long
lMin = 1: lMax = 40
lRng = CLng((lMin And &HFFFF&) Or ((lMax And &HFFFF&) * 65536))
SendMessage Me.ProgressBar1.hWnd, PBM_SETRANGE, 0, byVal lRng
но ничего не менятся