Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process bar
Message
 
À
15/09/2004 09:44:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00941827
Message ID:
00944444
Vues:
19
Thanks, this combined with Dana T's idea gives me what i am looking for, your code however takes the hard work out of it :)
Slán
~M

>If you don't need the progress bar linked to information (percentage, etc) then I would display an avi. For fun you can preview them using the form below (not thoroughly tested - just a quickie). When you run the .prg you will be prompted to insert an object. Choose the Microsoft Animation Control 6.0(sp4) from the control type window and click on OK. Run the prg and click on the OPEN command button. Browse to \program files\microsoft visual foxpro 7\graphics\videos and select an avi file to test (or the vfp8 directory, etc). You can browse and select any avi file on your hard drive actually as long as the form is supported.
>
>
>PUBLIC oform
>oform = NEWOBJECT('aviform')
>oform.show()
>
>DEFINE CLASS aviform AS form
>
>
>	DataSession = 2
>	Top = 10
>	Left = 18
>	Height = 353
>	Width = 483
>	DoCreate = .T.
>	ShowTips = .T.
>	BufferMode = 2
>	Caption = "Animation Control Sample"
>	WindowState = 0
>	Name = "form1"
>
>
>	ADD OBJECT commandgroup1 AS commandgroup WITH ;
>		ButtonCount = 3, ;
>		Value = 1, ;
>		Height = 97, ;
>		Left = 376, ;
>		Top = 14, ;
>		Width = 96, ;
>		Name = "Commandgroup1", ;
>		Command1.Top = 5, ;
>		Command1.Left = 5, ;
>		Command1.Height = 27, ;
>		Command1.Width = 84, ;
>		Command1.Caption = "Open", ;
>		Command1.ToolTipText = "Selects and Open .AVI Files", ;
>		Command1.ForeColor = RGB(255,255,0), ;
>		Command1.Name = "Command1", ;
>		Command2.Top = 34, ;
>		Command2.Left = 5, ;
>		Command2.Height = 27, ;
>		Command2.Width = 84, ;
>		Command2.Caption = "Play", ;
>		Command2.ToolTipText = "Plays an .AVI File", ;
>		Command2.ForeColor = RGB(128,255,0), ;
>		Command2.Name = "Command2", ;
>		Command3.Top = 63, ;
>		Command3.Left = 5, ;
>		Command3.Height = 27, ;
>		Command3.Width = 84, ;
>		Command3.Caption = "Stop", ;
>		Command3.ToolTipText = "Stops an .AVI File", ;
>		Command3.ForeColor = RGB(255,0,0), ;
>		Command3.Name = "Command3"
>
>
>	ADD OBJECT olecontrol1 AS olecontrol WITH ;
>		Top = 15, ;
>		Left = 20, ;
>		Height = 325, ;
>		Width = 337, ;
>		Name = "Olecontrol1"
>
>
>	PROCEDURE Error
>		LPARAMETERS nError, cMethod, nLine
>	ENDPROC
>
>
>	PROCEDURE setenabled
>	ENDPROC
>
>
>	PROCEDURE commandgroup1.Command1.Error
>		LPARAMETERS nError, cMethod, nLine
>		If nError = 1429
>		   MessageBox('This AVI Format is not supported')
>		EndIf
>		ThisForm.OleControl1.Stop
>		ThisForm.OleControl1.Visible = .F.
>		This.Parent.Tag = ""
>		ThisForm.OleControl1.Close
>		ThisForm.OleControl1.Visible = .T.
>	ENDPROC
>
>
>	PROCEDURE commandgroup1.Command1.Click
>		ThisForm.OleControl1.Stop
>		ThisForm.OleControl1.Visible = .F.
>		This.Parent.Tag = ""
>		ThisForm.OleControl1.Close
>		ThisForm.OleControl1.Visible = .F.
>		This.Parent.Tag = GetFile('AVI')
>		ThisForm.OleControl1.Close
>		If File(This.Parent.Tag)
>			ThisForm.OleControl1.Open(This.Parent.Tag)
>			ThisForm.OleControl1.Visible = .T.
>		ELSE
>			ThisForm.OleControl1.Stop
>			ThisForm.OleControl1.Visible = .F.
>			This.Parent.Tag = ""
>			ThisForm.OleControl1.Close
>		EndIf
>		ThisForm.OleControl1.Visible = .T.
>	ENDPROC
>
>
>	PROCEDURE commandgroup1.Command2.Error
>		LPARAMETERS nError, cMethod, nLine
>		a = Aerror(b)
>		MessageBox(b(2))
>		ThisForm.OleControl1.Stop
>		ThisForm.OleControl1.Visible = .F.
>		This.Parent.Tag = ""
>		ThisForm.OleControl1.Close
>		ThisForm.OleControl1.Visible = .T.
>	ENDPROC
>
>
>	PROCEDURE commandgroup1.Command2.Click
>		ThisForm.OleControl1.Visible = .T.
>		ThisForm.OleControl1.Play
>	ENDPROC
>
>
>	PROCEDURE commandgroup1.Command3.Click
>		ThisForm.OleControl1.Stop
>		ThisForm.OleControl1.Visible = .F.
>		This.Parent.Tag = ""
>		ThisForm.OleControl1.Close
>		ThisForm.OleControl1.Visible = .T.
>	ENDPROC
>
>
>ENDDEFINE
>
>
Go raibh maith agat

~M
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform