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>how to run a video file (.avi) from the form?