SBP main() 0 formobj%%0 iconbar%%0 "Meter" ee SetMeterDLLs() AxisX%%sys(11)2120 AxisY%%sys(12)2120 CreateMeter(AxisX%%,AxisY%%,"",formobj%%) i%%1q100k2 UpdateMeter(AxisX%%,AxisY%%,i%%,100,"Displaying meter "(i%%,"%"),formobj%%,iconbar%%) RemoveMeter(AxisX%%,AxisY%%,formobj%%)  SetMeterDLLs() _e168 "USER.EXE","GetActiveWindow","H" "USER.EXE","GetDC","HH" "USER.EXE","ReleaseDC","HHH" "GDI.EXE","CreateSolidBrush","HJ" "GDI.EXE","CreatePen","HIIJ" "GDI.EXE","SetBKColor","HHJ" "GDI.EXE","Rectangle","AHIIII" "GDI.EXE","SelectObject","HHH" "GDI.EXE","DeleteObject","AH"  ' ************************************************************************* ' * CreateMeter() - This procedure uses form on the fly to create the ' * meter window ' * AxisX%% - X location of the meter ' * AxisY%% - Y location of the meter ' * MergeText$ - Text to be placed on the meter box ' * formobj%% - whether to use form object rather than Win API ' * Example : CALL CreateMeter (10,10,"Processing records, Please wait...",1) ' * Result : The meter window be placed at x,y location with the text. ' ************************************************************************* CreateMeter(AxisX%%,AxisY%%,MergeText$,formobj%%) s2 8,10260,16,1,0,2 |1,AxisX%%,AxisY%%,240,60 516 |1,AxisX%%10,AxisY%%10,220,20 1,0833 o"MS Sans Serif,8" _e205 zMeterText$ |7,AxisX%%8,AxisY%%40,220,14,zMeterText$,0 zMeterText$MergeText$ formobj%%p 4 |1,AxisX%%12,AxisY%%12,0,0   ' ************************************************************************* ' * UpdateMeter() - This procedure uses form on the fly to update the % ' * of the job. ' * AxisX%% - X location of the meter ' * AxisY%% - Y location of the meter ' * VMin%% - Minimum number of the meter ' * VMax%% - Maximum number of the meter ' * formobj%% - whether to use form object rather than Win API ' * iconbar%% - if formobj%%=0 (i.e. use Win API) this is a bodge to ' * which should be set to 1 if icon bar is displayed ' * Example : CALL UpdateMeter (1517,1034,1,5) ' * Result : Updates the meter bar ' ************************************************************************* UpdateMeter(AxisX%%,AxisY%%,VMin%%,VMax%%,MergeText$,formobj%%,iconbar%%) formobj%%p 4 1,AxisX%%12,AxisY%%12,AxisX%%12,AxisY%%12,(VMin%%VMax%%)216,16  ^  Get Window Sizes  Get the Display Context for Superbase zSIDEWnd&%("GetActiveWindow") SBDC%%("GetDC",zSIDEWnd&%) sx%%AxisX%%12 sy%%AxisY%%12(iconbar%%,25,0) tColo&%dec("FF0000") brush&%("CreateSolidBrush",tColo&%) pen&%("CreatePen",0,0,tColo&%)  t% = CALL ("SetBKColor",sbdc%%,tColo&%) object&%("SelectObject",SBDC%%,brush&%) oldpen&%("SelectObject",SBDC%%,pen&%) err%%("Rectangle",SBDC%%,sx%%,sy%%,sx%%(VMin%%VMax%%)216,sy%%16) brush&%("SelectObject",SBDC%%,object&%) pen&%("SelectObject",SBDC%%,oldpen&%) err%%("DeleteObject",brush&%) err%%("DeleteObject",pen&%) a%("ReleaseDC",zSIDEwnd&%,sbdc%%) MergeText$""p  MODIFY FORM 5,AxisX%% + 10,AxisY%% + 40,AxisX%% + 10,AxisY%% + 40,220,12,MergeText$ ATTR 32 zMeterText$MergeText$   ' ************************************************************************* ' * RemoveMeter() - This procedure removes the meter box from the form ' * AxisX%% - X location of the meter ' * AxisY%% - Y location of the meter ' * formobj%% - whether to use form object rather than Win API ' * ' * Example : CALL RemoveMeter (1517,1034,1) ' * Result : Removes the meter from the screen ' ************************************************************************* RemoveMeter(AxisX%%,AxisY%%,formobj%%) 1,AxisX%%,AxisY%% 1,AxisX%%10,AxisY%%10 7,AxisX%%10,AxisY%%40 formobj%%p 1,AxisX%%12,AxisY%%12