With one of the last upgrades (I don't remember which, 9.1 I think?) the Gas Gauge functionality of the Msg() function quit working. The gas gauge bar appears, but it's empty and stays empty until the message closes. The screen-shot below shows what the msg looks like half way through processing.
I'm using the code straight out of the Programmers Reference Manual:
$Insert Msg_Equates declare function msg * * to display a gauge (percent bar), use the "G" type; sub-types are C (show * cancel button) and Y (yield on each cycle): * orderCnt = 100 Def = "" Def<MCAPTION$> = "Processing Orders..." Def<MTYPE$ > = "GC" Def<MEXTENT$> = OrderCnt Def<MTEXTWIDTH$> = 200 MsgUp = Msg(@window, Def) for Order = 1 to OrderCnt gosub ProcessOrder * update the gauge and check if cancel was pressed while Msg(@window, MsgUp, Order, MSGINSTUPDATE$) next Order retval = Msg(@window, MsgUp) ;* take down the gauge return 0 ProcessOrder: * * Process order number "OrderCnt" * for i = 1 to 1000000 next i returnAny idea how I would fix this?
Thanks!
Carl
your code works in my 9.1.1 and 9.2.1
Is this Windows 7? Try throwing a Yield() in the loop processing.
But be advised the Yield() can cause other OI events to complete before the loop is done. Carl has some great information on this thread.
I've tested on both Windows 7 and XP. Adding a call to Yield() didn't change anything. There isn't any flickering of message dialog either for what it's worth. Thanks!