View Single Post

  #3 (permalink)  
Old 10-19-2007
Winwaed's Avatar
Winwaed Winwaed is offline
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 776
Blog Entries: 4
Re: Multi-threading in an add-in?

Thanks Mike, yes "Thread.Sleep" is what I was referring to as the equivalent in .NET. The problem is that this literally stops the thread for the specified period of time. I want to "process all messages", so I need a sleep that does that in the background. (VB6's sleep() does this).

Following your link led me to go back to the online MSDN docs. There I found Thread.Join which does the required message processing BUT it needs to work on a second thread. So far that isn't working for me, and if I create a second thread then I might as well run the entire dialog box in its own thread (which is what I do in standalone apps).

I'll probably give this a go next, although I know multiple threads in add-ins is prohibited in VB6 and I suspect all add-ins.

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Reply With Quote