کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

ProgressBar نوار پیشرفت




PBM_SETRANGE=&H401
PBM_SETPOS=&H402
PBM_DELTAPOS=&H403
PBM_SETSTEP=&H404
PBM_STEPIT=&H405
PBM_SETRANGE32=&H406
PBM_GETRANGE=&H407
PBM_GETPOS=&H408
PBM_SETBARCOLOR=&H409
PBM_SETMARQUEE=&H40A


PBS_SMOOTH=&H1
PBS_VERTICAL=&H4
PBS_MARQUEE=&H8
PBS_SMOOTHREVERSE=&H10

PBST_NORMAL=&H1
PBST_ERROR=&H2
PBST_PAUSED=&H3


PBM_GETPOS message

Retrieves the current position of the progress bar


Parameters

wParam

Must be zero

lParam

Must be zero




PBM_SETPOS message

Sets the current position for a progress bar and redraws the bar to reflect the new position

Parameters

wParam

Signed integer that becomes the new position

lParam

Must be zero


PBM_SETSTEP message


Specifies the step increment for a progress bar. The step increment is the amount by which the progress bar increases its current position whenever it receives a PBM_STEPITmessage. By default, the step increment is set to 10

Parameters

wParam

New step increment

lParam

Must be zero



case UDN_DELTAPOS

lpnmud = (LPNMUPDOWN)lParam

iPosIndicated =SendMessage(hwndProgBar
(PBM_GETPOS,(WPARAM)0, (LPARAM)0,

SendMessage(hwndProgBar, PBM_SETPOS,(WPARAM)(iPosIndicated + lpnmud->iDelta,0


lParam

Pointer to an NMUPDOWN structure that contains information about the position change. The iPos member of this structure contains the current position of the control. The iDelta member of the structure is a signed integer that contains the proposed change in position


If the user has clicked the up button, this is a positive value

If the user has clicked the down button, this  is a negative value







زمان ساختن  کنترل نوار پیشرفت 

SendMessage(hControl,
((PBM_SETRANGE,0,MAKELPARAM(0, 100,

SendMessage(hControl, PBM_SETSTEP, (WPARAM) 1,
(0,

Parameters

wParam

State of the progress bar that is being set. One of the following values.

ValueMeaning
PBST_NORMAL
In progress.
PBST_ERROR
Error.
PBST_PAUSED
Paused.

lParam

Must be zero.





Case WM_COMMAND
    Dim iPosIndicated As LongPtr
     If lParam = hbtn Then 
    " SetWindowTextA hbtn, "JK
     SendMessageA hprog, PBM_SETSTEP, 1, 0

     Do While pp < 102
     'SetWindowTextA hwnd, nmp.iPos
            SendMessageA hprog, PBM_SETPOS,  pp, 0
       pp = pp + 1
       Loop
     End If









SetWindowLongPtr hprog, GWL_STYLE, GetWindowLongPtrA(hprog, GWL_STYLE) Or PBS_VERTICAL