Sets the update mode for, and/or updates, a WinBatch box.
BoxUpdates(box ID, update flag)
(i) box ID the ID number of the desired WinBatch box.
(i) update flag see below.
(i) @TRUE on success; @FALSE on failure.
BoxUpdates controls how particular boxes are updated. Screen updates can be suppressed so that images seem to suddenly appear on the screen, rather than slowly form as they are drawn. This function is rarely required.
Update flag:
0 Suppress screen updates
1 Enable updates (this is the default setting)
2 Catch up on updates
3 Redraw the entire box
; Define Main Box BoxesUp("100,100,900,900",@ZOOMED) BoxColor(1,"255,255,0",0) BoxDrawRect(1,"0,0,1000,1000",2) BoxCaption(1,title) BoxColor(1,"0,0,255",0) ; Define Shape Colors color1 = "255,0,0" ; RED color2 = "0,0,255" ; BLUE
info = 'Default update handling' BoxUpdates(1,1) ;Default Updates For x = 1 To 6 Pause('See whats happening...',info) BoxDrawRect(1,"100,100,200,200",1) BoxDrawCircle(1,"300,100,500,200",1) BoxDrawRect(1,"100,300,200,400",1) BoxDrawCircle(1,"300,300,500,400",1) BoxDrawRect(1,"100,500,200,600",1) BoxDrawCircle(1,"300,500,500,600",1) BoxDrawRect(1,"100,700,200,800",1) BoxDrawCircle(1,"300,700,500,800",1) If x mod 2 Then BoxColor(1,color1,0) Else BoxColor(1,color2,0) Next
info = 'Suppressed update handling' BoxUpdates(1,0) ;Suppress Updates For y = 1 To 5 Pause('See whats happening...should be nothing',info) BoxDrawRect(1,"100,100,200,200",1) BoxDrawCircle(1,"300,100,500,200",1) BoxDrawRect(1,"100,300,200,400",1) BoxDrawCircle(1,"300,300,500,400",1) BoxDrawRect(1,"100,500,200,600",1) BoxDrawCircle(1,"300,500,500,600",1) BoxDrawRect(1,"100,700,200,800",1) BoxDrawCircle(1,"300,700,500,800",1) If y mod 2 Then BoxColor(1,color1,0) Else BoxColor(1,color2,0) Next
BoxUpdates(1,1) ;Enable Updates BoxUpdates(1,2) ;Catch up on Updates Message(title,"That's all folks") Exit