I've found this unpredictable too - because the picture box control belongs
to the VB app but MapInfo controls its contents. With MapX its more
straightforward.

Preventing unwanted redraws ca transform the performance of an app and its
vital to be able to do it.

The only way I've been able to get predictable results is to have two
picture boxes the same size in the same place on a form, one of which is
reparented to MapInfo and the other of which is visible off.

When you need to lock the screen, grab the contents of the MapInfo window
using the HWND into a Picture object - theres example code on the Micrososft
site at http://support.microsoft.com/default.aspx?scid=KB;en-us;q161299.
I've implemented this as a class.

Then hide the picture box with the map, set the other one visible and assign
the picture object to it. Depending on your screen there may be a tiny jump
but you can adjust the top/left properties of the picture box a few twips to
allow for it.

When you want to unlock reverse the visibility of the two picture boxes. It
seems longwinded but its instantaneous and the highlighting/selection etc in
the map is maintained.

HTH


Paul Crisp

Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: Matt Bolton [mailto:[EMAIL PROTECTED]
Sent: 30 October 2003 14:53
To: Simmonds, Ashley (PTB)
Cc: [EMAIL PROTECTED]
Subject: Re: MI-L Stop map redraw (integrated mapping)


Ash,

I'm using a MI window integrated on the VB form (in a pic box). 

I gather from your post that you've tried set map redraw off, and it 
works sometimes, but not others  - is that right?

Not sure about the echo options - does it work in VB as well as VBA (a 
help search only bought up a reference in Access Help).
I've tried it in my code, but it doesn't work - perhaps because the 
reference to MI is as an object:

    Set mobjMI = CreateObject("Mapinfo.Application")
    MI_Do "Set Application Window " & mlPicHwnd
    mobjMI.Echo False

How do you use it?

Thanks,

Matt


Simmonds, Ashley (PTB) wrote:

>is your map window integrated into a form or is a form controlling the MI
>window?
>
>if it's on a form, you could just set the host application echo properties
>to false or make the form not visible for a bit.
>
>i know it's annoying though, i think in my apps when there's a lot of
>processing to happen on the map, i ended up just making the form invisible.
>a decent process, zoom to with long zoom and redraw would usually take
about
>15 seconds, but i got it down to like 3 by not displaying stuff as it
>happened.
>
>as to the map redraw option, i've found it to be hit and miss, so i've
>pretty much gotten rid of the command and just use the application.echo
>feature on the host app.
>
>dang, huh?
>
>ash
>
>-----Original Message-----
>From: Matt Bolton [mailto:[EMAIL PROTECTED]
>Sent: Thursday, 30 October 2003 4:39 PM
>To: [EMAIL PROTECTED]
>Subject: MI-L Stop map redraw (integrated mapping)
>
>
>Hi all,
>
>I'm doing some complex MI map & data manipulation via integrated mapping 
>using VB  (I know I could do with MapBasic, but I'm more familiar with 
>VB).   I want to be able to do all the processing without the map window 
>redrawing after each step, but have tried the following without success:
>
>objMI.Do "Set Event Processing Off"
>          and
>objMI.Do "Set Map Redraw Off"
>
>Neither seems to have any effect.  Can anyone suggest what I need to do 
>to get either of these to work?
>
>Thanks,
>
>Matt
>
>  
>

-- 
Matt Bolton
 
Mach 3 IT 

Mobile 0412 122 416
Email  [EMAIL PROTECTED]




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 8960


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to