Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Those animated forms

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB
Hi All
Can anyone help with the following. Having been a user of Vis Fox 6 for sometime now, I'm looking to create a form that shows an animated movement whilst something else is going on

Example, when you copy a file from one location to another, windows brings up a form on screen that shows a very nice folder flying from left to right whilst the copying process is going on.

Can this be done in Visual FoxPro (I'm sure it can) and if so, where's the best place to get some example code?
The reason for it, I now have an an app that imports data from another table and as the information contained is now increasing there can be a delay so it would be good to tell the user that something is going rather than them think the system has hung
Look forward to any replies or suggestions
Many thanks
KB When everything else is said and done, there will be nothing else to say or do! God Bless everyone....
 
keepingbusy

The files are .avi files, and you should find a number of them on your system.

The ActiveX control is Microsoft Animation Control, and the required code, (needs modifying to suit), is :-

WITH THIS.oleFileMove
[tab].Open(ADDBS(oMain.cHomeFolder) + [avi\filemove.avi])
[tab].Play()
ENDW
HTH

Chris [pc2]
 
Thanks Chris

In which event do I place the code you have shown in the form?

KB When everything else is said and done, there will be nothing else to say or do! God Bless everyone....
 
Thanks Chris

I'll give your advice a go

KB When everything else is said and done, there will be nothing else to say or do! God Bless everyone....
 
I am working on a similar problem, and while the above code and solution work fine for me, I want to know if there is a way to incorporate the *.avi file into the .exe file. I attempted to add the file to the project (under Other Files in the Project Manager), and I believe the file is added into the .exe. Yet when I run the program, I receive a file not found error. If I add the .avi file separately to the same directory and run it, it finds it and works fine. Is there a path setting somewhere that I need to assign so that it looks in the .exe? The main reason I want to do this is that this .exe is part of an automated download and I didn't want to have to download any additional files to the remote system if possible. Thanks.

Rob
 
rsmock21

Right-mouse on the file in the project manager and it should be set to include to compile it in the exe. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
You've probably found the truth: the animation control CANNOT access files inside the .EXE.

You can copy the file out of the exe, then use it with the animation control, though.
 
Thanks, Mike. The file is indeed set to include, and I know the new compiled exe is larger in size than before (to accommodate the file). I'm running VFP6 if that helps.

Rob
 
rsmock21

I may be inclined to think like wgcs. Since an avi file is a compressed file, and including it in a exe makes it a read-only file...
But try something.
1. Put it in a specific directory (for example create a animation directory on your system, and put the avi on there).
2. Re-include it in the exe (making sure it's include in the exe)
3. Re-complile it.
4. Move the exe to the other machine.
5. Create an empty "animation" directory in that machine. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Mike,
I tried your suggestion: both an empty directory of the same name from both systems' root directory, and I also tried using an empty subdirectory (off of the project directory on my system, and off the application directory on the remote side), but still no luck. Curious, what is the reasoning behind that idea? Does it extract the file from the .exe to that directory if it finds it? Please let me know if you have any other thoughts, thanks.

Rob
 
Curious, what is the reasoning behind that idea?

I find that sometimes VFP looks into the directory of origin first and then looks into the exe. But if the directory doesn't exist (empty or not ) it through an error. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top