MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Showing ZIP code divisions for territories programmatically

This is a discussion on Showing ZIP code divisions for territories programmatically within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello all, I have been having some trouble handling territories using VB.Net (or VB6). My main issue is that I ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-10-2003
Fer Fer is offline
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 11
Showing ZIP code divisions for territories programmatically

Hello all,

I have been having some trouble handling territories using VB.Net (or VB6). My main issue is that I need to have the ability to show the Zip code divisions that appear when defining territories using ZIP Codes but I don't need to have the Territories Manager also appearing at the same time. I've noticed that the only way to make these divisions appear is if I also have the Territory Manager on the map, and I wish to avoid that.

I haven't actually been able to find out much about handling territories programmatically, so if anyone has done something like this then any suggestions are welcome.

I've also been hitting my head repeatedly trying to find out how to do in code the same simple stuff that one can do with the application like for example adding to a territory or deleting a territory. So far I can only end up with a dataset collection after using the ImportTerritories method but can't do a whole lot with it.
Anyone has done some territory programming that could give me a few pointers about it? All will be much appreciated.

Thanls again,

Fernando
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 09-10-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I found a way to do it, but it ain't clean! It basically has to do with using Sergiy Pavlov's article of 'Extending the MapPoint ActiveX Control'. I found out that I only have to use the
Code:
ShowWindow(hWnd, SW_NORMAL)
API call, where hWnd is the handle to the territory manager dialog obtained through Spy++ and SW_NORMAL is a const to indicate that the window is to be shown. this only shows the zip code divisions and doesn't show the territory manager dialog. BUT there's a trick to it: first, you gotta have a way to find out the hWnd of the TM dialog, since it changes from instance to instance, and you also must have previously loaded at least one territory before this works, or else MP won't know the type of division that you want to show.

It looks kind of complicated but it's the best I've got so far. If anyone comes up with a better idea please share it in the forum. I'm still trying to see how to achieve the other functions I need to carry out. I saw that maybe the LinkTerritories method might help a bit, because I would only be left with the data source to deal with, but at the expense of performance because all the territories will have to be refreshed everytime I make a small change in the data source.

As always, any ideas are appreciated.
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


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
Multiple Territories Assocaited with a zip Code??? lane MapPoint 2006/2009 Discussion 0 05-15-2006 09:59 AM
Creating Territories programmatically Atul22 MapPoint 2006/2009 Discussion 3 10-05-2004 10:15 AM
Programmatically creating Territories? jlaretto MapPoint 2006/2009 Discussion 1 01-29-2004 02:01 AM
Reading Territories name Programmatically using VB Anonymous MapPoint 2006/2009 Discussion 2 05-20-2003 08:20 AM
Zip Code Counts to Territories RogerMcc MapPoint 2006/2009 Discussion 3 10-24-2002 08:57 PM


All times are GMT -5. The time now is 02:43 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

Ski Accomodation
Book ski accommodation to suit your needs. Holiday Hypermarket makes it simple to specify ski accommodation online. Use our ski holiday search to find holidays for you.

Turkey Weather
Check out Turkey Weather - Travel Counsellors details information on Turkey including, weather, flights and accommodation.

Holiday in Portugal
A holiday in Portugal is low cost but great value when you book with us online. Transportation and accommodation are excellent and very reasonable too.

Mauritius Holidays
Mauritis holidays are a sun drenched, sense tingling experience of a lifetime. You will find bargain deals on many holidays with us!

Cheap Holidays
Hunting for cheap holidays? Well save time by booking online with ulookubook.com and you can even check out our top tips to help you hunt down a bargain holiday.

Compare Prices
Travel.co.uk makes it easy for you to compare prices from hundreds of UK based travel companies.

Cheap Holidays to Sharm el Sheikh
Break away to Northern Africa. Find cheap holidays to Sharm el Sheikh at On The Beach.


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