How to use AfterRedraw()??

VC_Man
01-02-2007, 07:14 AM
Hello best programmers,

There is an event called AfterRedraw(), but it is so poorly documented. I just understand that this event occurs after finishing repainting the map. Well, when does it repaint exactly, cuz I don't know how and when MP paints.

Thereby I've read that someone was able to put his own logo instead of Microsofst's logo in the upper right corner, using the AfterRedraw() method. And that's why I'm so interested how to use AfterRedraw.

Another problem is that I wanted to use MP2006 as a serverapp on the server, when I've done that, MP displays the map as a .gif with 4 lines of comments about microsoft mappoint products. Ofcourse depending on the size of the mappicture. But I can't show the map this way to the users, that's to ugly. So again, I may solve this by using AfterRedraw method.

Hope someone knows more about the AfterRedraw, thnx anyway.

Wilfried
01-02-2007, 07:41 AM
Hi,

Yes AfterRedraw is like the name say, it is fired after every redraw. This is after a map load, zoom, pan, etc.

About the logo. You can hide it by putting a panel on it and you can put on the panel a bitmap with your own logo. However you must carefully read the end user agreement because it say something of the logo. Depending the use of the map it may not be removed.

If you bother about the poping up of MapPoint help when someone click on the logo then just put a transparant panel on it, so the panel will intercept the mouse click and you are rid of that.

About the created GIF image, please also read carefull the end user agreement for it. You can get rid of the lines if you copy the map in your code to clipboard. Then you can copy it back into your own bitmap and save it to a file. The Html page you can generate yourself easy if needed.

VC_Man
01-02-2007, 08:14 AM
Ok, I understand the license agreement limits us in deleting the logo.

But for example to get a map without a logo, I could save the map in a file when an AfterRedraw event occurs, right?

Thnx for your answer Wilfried.

Wilfried
01-02-2007, 01:57 PM
Hi,

Yes, after redraw you copy the map to clipboard. Then copy it in your own bitmap object and save it to file in the format (gif or whatever) you like. Then you create yourself the html file and you are done :)

 
Web mp2kmag.com
mapforums.com