MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth 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

Today's Posts Twitter Feed 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,177
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
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
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
See the Geoweb Guru for online mapping
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,177
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
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
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
See the Geoweb Guru for online mapping
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,177
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,177
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 04:09 PM
Handling Route that Calculates but does not Optimize Eric Frost MapPoint 2006/2009 Discussion 4 03-07-2005 02:07 PM
Optimize Events Anonymous MapPoint 2006/2009 Discussion 0 12-03-2003 11:45 AM
Optimize and calculate a Route rms62 MapPoint 2006/2009 Discussion 2 08-22-2003 02:55 PM
Route optimize: shortest vs quickest David Kachuck MapPoint 2006/2009 Discussion 1 12-16-2002 07:23 PM


All times are GMT -5. The time now is 03:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Costa Brava Holiday
Beautiful kilometres of sandy beaches await you should you choose a Costa Brava holiday through UlookUbook!



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 55 56 57 58 59