>I am working w/ the Pepperwhite map control, and for the most part am very happy w/ it, but I do have one problem and I was wondering if anyone had encountered the problem and maybe had a workaround idea. (This may also be a general ActiveX thing).
>
>I would like to give the user the ability to resize a map. However, when the form is resized, the map is not completely redrawn. It is only redrawn in the area of the map prior to re-sizing. If I click in the map area (either the drawn or the un-drawn area) the full map then appears.
>
>I suspect this is a VFP issue, but have not been able to determine some way around the problem.
>
>The map control is contained in a container object. When the form is resized, the RESIZE event calls a custom REFRESHFORM method, which adjusts the size of the container, and then calls a REFRESHFORM method for the container, which resizes the map.
>
>AutoYield is .F., but calling DOEVENTS does not have any effect. BITMAP is set ON. The AfterPaint event in the ActiveX control is being called, so the map control seems to be painting okay, it's just that it isn't displaying in the full viewport that is available after resizing. Same problem happens if the maximize box is clicked.
>
>Resizing to make the map smaller works fine.
>
>Any suggestions appreciated.
>
>jd
I got it to resize for me by:
1. adding two properties to my form - vinOldHeight and vinOldWidth with orignal design default values.
2. adding the following code to the container ReSize event method:
DODEFAULT()
WITH THIS
IF .Height <> THISFORM.vinOldHeight OR .Width <> THISFORM.vinOldWidth
.Map.Height = .Map.Height + .Height - THISFORM.vinOldHeight
.Map.Width = .Map.Width + .Width - THISFORM.vinOldWidth
THISFORM.vinOldHeight = .Height
THISFORM.vinOldWidth = .Width
.Map.Action = pwDraw
ENDIF
ENDWITH
Bill N.