Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Image Timer
Message
De
29/12/2003 09:30:47
 
 
À
25/12/2003 04:05:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00861903
Message ID:
00862475
Vues:
15
>Ok Mr.Claudio :P

:)

>
>Can You Please give me a small Example During loop

Here we go:
oMyform                 = CREATE('myform')   
oMyform.Show   
READ EVENTS
return

Define Class MYFORM AS Form
    height              = 60
    caption             = "Testing Progress bar"
    autocenter          = .t.
    maxbutton           = .f.
    minbutton           = .f.
    alwaysontop         = .t.
    procedure destroy
        clear events
    endproc
	Add OBJECT oProgress AS opbar with ;
      	Left            = Thisform.Width/2,;
     	Top             = 5,;
       	Left            = 5
	Add OBJECT CMDRUN AS CommandButton with ;
     	Caption         = "Run",;
      	Top             = 30,;
        Height          = 20
	Procedure CMDRUN.Click
	    set cursor off
	    for i = 1 to 100
     	    thisform.oProgress.value     = i
     	    thisform.caption             = "Testing Progress bar "+allt(str(i))+"%"
     	    =inkey(0.2)
	    endfor
	    set cursor on
	    clear events
	Endproc
	Procedure CMDRUN.init
	    this.left       = (thisform.width-this.width) / 2
	endproc
Enddefine
DEFINE Class opbar AS Olecontrol
     OleClass           = "MScomctlLIB.ProgCtrl.2"
     OleLCID            = 1033
     PROCEDURE Init
        this.Width       = this.parent.width-10  &&Adjusts the Width of the Label to 1 character
        this.left       = (thisform.width-this.width) / 2
        This.Max         = 100
        This.Min         = 0
	Endproc
Enddefine
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform