VFP applications can't spawn multiple threads natively, so you need a 3rd party library
to do it:
-VFP2C32.FLL ( VFPX https://vfpx.codeplex.com/wikipage?title=VFP2C32&referringTitle=Home )
-DMULT.DLL ( foxpert.com http://www.foxpert.com/download/DMULT.ZIP )
-PARALLELFOX ( VFPX https://vfpx.codeplex.com/wikipage?title=ParallelFox&referringTitle=Home )
Multithreading vfp demos:
(5/16/2006) Multi-threading feature of desktop VFP: http://blogs.msdn.com/calvin_hsia/archive/2006/05/16/599108.aspx -Create multiple threads from within your application by Calvin Hsia. IMHO, this is one of the best additions to VFP in a great while and perhaps the last we'll see from the VFP team.
Examples based on this new class
MTmyVFP Version 3
MTmy VFP is written completely in FoxPro and all source code is included.
Test and use the examples in the included simple form, or, just create and run from the foxpro command window:
Param 1 - the code that will run in a background thread
Param 2 - any parameter you want to pass to your code
Param 3 - code that will run when your thread completes
Param 4 - code that will run in the foreground while your thread is processing (you could possibly add a progress bar here like the one in ctl32_progressbar in VFPX)
oThreadMgr.SendMsgToStopThreads() - stop the threads
oThreadMgr.SuspendThreads() - pause the threads
oThreadMgr.ResumeThreads() - resume the threads
Calvin Hsia's original source and background info:
VFP Web Crawler Version 2
An open source, multi-threaded Visual Foxpro application that will crawl and retrieve blog pages. It will work with any MSDN blog as is. It could, more than likely, be modified to do any kind of web crawling
Version 2 features include:
-ability to specify number of threads
-better switching between blogs
-debug option to make crawling visible
This webcrawler will crawl and store any MSDN blog.
Try changing the URL in the Options to some of the following:
http://www.codeplex.com/VFPWebCrawler (uses Calvin Hsia's latest vfp multi-threading class with advanced events, VFP 9)
MT example app from Fernando Bozzo (VFP 8,9)
"The demo is a simple form with 3 buttons wich do some work in it own thread, and then bring back the results to display them. Have a checkbox for testint the same methods in multithreaded and not multithreaded mode."
Category Parallel Processing
( Topic last updated: 2015.07.28 08:33:05 PM )