Hi!
Is there a way to show the Optimise progress bar in a VB app, like in Mapppoint 2004 ?
Some times process can be very long, so users can't see if it's still computing or crashed.
Thanks for your answer.
This is a discussion on Optimize Progress Bar within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi! Is there a way to show the Optimise progress bar in a VB app, like in Mapppoint 2004 ? ...
Hi!
Is there a way to show the Optimise progress bar in a VB app, like in Mapppoint 2004 ?
Some times process can be very long, so users can't see if it's still computing or crashed.
Thanks for your answer.
Hi,
Tell your users you write crashFree programs so they dont have to worry
Which process you want to show a progress bar for ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Hi!
Thank you for your answer !
Well, I think my customers haven't funny taste like us
So here is a copy of what I want to do :
http://img251.imageshack.us/img251/494/mappoint4ye.jpg
I think you have to multi-thread your addin so that the status bar is animated whilst MapPoint is processing.
From what I remember, multi-threaded VB is not allowed for MapPoint add-ins which run "in-process".
I've done some status updates with timers, but I don't think this will work in this case. The timer call will wait until the optimise route has finished!
Richard
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Hi,
Richard is right, Mappoint blocks the message pump while it calculate a route. About threading, visual objects are not threadsafe in general, so a form is not.
What is easy to do is spamn another application that only display the form in the center of the form of the map with a progress bar. The calculated time may be a gues, but you can experiment a little and let the program guess it depending on the amount of stops. Should be more or less OK.
So you launch the application in your code before calculating route, and when it is calculated you post a WM_QUIT message to that application which will then exit. Your form (with mappoint) will not have focus because message pump is blocked, so progressbar will stay visible.
Maybe better ideas but this is the best I can come up with at the moment..
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Wilfried: That's a good idea. Could be fiddly in VB, but it is essentially "coarse grained" threading.
Richard
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
ok, thank you!
Finally I think the crashfree statement is the best solution![]()
Here's what I use in C# which does exactly what you want
SendMessage(FindWindow(null, "Map - Microsoft MapPoint North America"), WM_COMMAND, 35388, 0);
Needs SendMessage imported from User.dll
Doesn't anyone here use Spy++ any more?
Joel
Hi Joel,
He does not need to import since he use VB (not dotNet) so he can just call the win32 API. However, can you explain what you do ?
I understeand the WM_COMMAND message. It is sent when accelarator key's are used or when menu item is selected. But where do you get the WParam value from ? I know it is notif code and ident but how do you know both of the values ?
Maybe I have to check Spy++ as you mention. What is URL of it?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Hi,
Whell it is the most professional answer you can give to a customar. The strange thing is that they always beleive itOriginally Posted by Metod
Also you can raise the invoice without test period !!!
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)