HELP FOR MSGMETER

HELP FOR MSGMETER

Postby Silvio » Sun Jan 28, 2007 12:52 am

hOW I CAN MAKE TO INSERT CONTROL PROGRESS INSTEAD METER ON MSGMETER FUNCTION ?

Code: Select all  Expand view

  function MsgMeter1( bAction, cMsg, cTitle )

   local oDlg, oMeter, oText, oBtn, oFont
   local lEnd := .f., lCancel := .f.
   local nVal := 0

   DEFAULT bAction := { || nil },;
           cMsg := "Processing...", cTitle := "Please, wait"

   DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8

   DEFINE DIALOG oDlg FROM 5, 5 TO 13, 45 TITLE cTitle FONT oFont

   @ 0.2, 0.5  SAY oText VAR cMsg SIZE 130, 10 OF oDlg

   [b]@ 1,   0.5  PROGRESS oMeter VAR nVal TOTAL 10 SIZE 150, 10 OF oDlg[/b]


   @  2.2,  10.4  BUTTON oBtn PROMPT "&Cancel" OF oDlg ;
      ACTION ( lEnd:= .t., lCancel:= .t. ) SIZE 32, 11

   // This block gets evaluated only the first time the DialogBox is painted !!!
   oDlg:bStart = { || Eval( bAction, oMeter, oText, oDlg, @lEnd, oBtn ),;
                      lEnd := .t., oDlg:End() }

   ACTIVATE DIALOG oDlg CENTERED ;
      VALID lEnd

   oFont:End()

return lCancel




i TRY WITH @ 1, 0.5 PROGRESS oMeter VAR nVal TOTAL 10 SIZE 150, 10 OF oDlg

BUT IT NOT RUN OK
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: SantaCroya and 48 guests