Fernando D. Bozzo


Hi:

Just want to share another multithreading Demo with sources.

It's based on Calvin Hsia's excellent work that posted in his blog at:

http://blogs.msdn.com/calvin_hsia/archive/2006/05/23/605465.aspx

I've just added the callback part and few methods and encapsulated all in 2 prg's to make it reusable.

The demo is compiled in VFP 9 and you can found it in www.portalfox.com, at this link:

http://www.portalfox.com/articulos/archivos/bozzo/Test_Threads.zip

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.

To use in VFP 8 just need to recompile the executables and the MT DLL (t1.dll)

Hope that likes you.

Regards,

Fernando D. Bozzo





Re: Multithreading in VFP 8 and 9

Claude Fox


Fernando,

Nice work!!  Simple but powerful..

My own MT examples are at:

http://www.codeplex.com/MTmyVFP - versions for VFP 7,8,9 and a background printing routine, basic events

http://www.codeplex.com/VFPWebCrawler - VFP9, latest MT class from Calvin, more extensive event handling (stop, restart, etc)

One of my goals was to prove how easy it is to implement this in VFP, now that Calvin has done the hard part.  It would be great if MS could just include Calvin's MT class in the base VFP foundation classes in VFP10/Sedna .... 







Re: Multithreading in VFP 8 and 9

Fernando D. Bozzo

Hi Claude:

I've seen your work, that like mine, is based on Calvin's excelent code. Whe have inspired with it :)

Now yesterday some people have reported me an incompatibility with VFP 8 that I just have solved with a VB dll I've made to solve the BindEvent incompatibility between VFP 8 and 9 (new syntax), so anytime the new version 1.1 will be in www.portalfox.com for free download.

I think that copying and adapting the VFP 8 conditional code and using the VFPCOM component available freely from Microsoft it would be compatible with VFP 6 and 7 too. Doing this work I've lerned an API trick to pass information between apps using File Mappings, an interesting thing.

I'm keeping an eye on your work ;-)

Regards,

Fernando D. Bozzo