MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Optimize Progress Bar

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 ? ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2005
Junior Member
White Belt
 
Join Date: Oct 2005
Posts: 3
Optimize Progress Bar

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-04-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi,

Tell your users you write crashFree programs so they dont have to worry

Which process you want to show a progress bar for ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-07-2005
Junior Member
White Belt
 
Join Date: Oct 2005
Posts: 3
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-07-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 892
Blog Entries: 9
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-07-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-07-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 892
Blog Entries: 9
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-07-2005
Junior Member
White Belt
 
Join Date: Oct 2005
Posts: 3
ok, thank you!

Finally I think the crashfree statement is the best solution
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-08-2005
Junior Member
White Belt
 
Join Date: Aug 2003
Posts: 10
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 11-08-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 11-08-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi,

Quote:
Originally Posted by Metod
Finally I think the crashfree statement is the best solution
Whell it is the most professional answer you can give to a customar. The strange thing is that they always beleive it Also you can raise the invoice without test period !!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
bar, optimize, progress


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 06:58 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54