Community of VE/MapPoint Users and Developers
This is a discussion on Optimize Progress Bar within the MapPoint 2006/2009 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 ? ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Optimize Progress Bar 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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
|
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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
|
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 Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
| |||
| Or...
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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| bar, optimize, progress |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimize multiple stops | petekk | MapPoint 2006/2009 Discussion | 7 | 09-29-2005 05:09 PM |
| Handling Route that Calculates but does not Optimize | Eric Frost | MapPoint 2006/2009 Discussion | 4 | 03-07-2005 03:07 PM |
| Optimize Events | Anonymous | MapPoint 2006/2009 Discussion | 0 | 12-03-2003 12:45 PM |
| Optimize and calculate a Route | rms62 | MapPoint 2006/2009 Discussion | 2 | 08-22-2003 03:55 PM |
| Route optimize: shortest vs quickest | David Kachuck | MapPoint 2006/2009 Discussion | 1 | 12-16-2002 08:23 PM |