Thread: ActiveX Control
View Single Post

  #4 (permalink)  
Old 09-04-2002
John Meyer's Avatar
John Meyer John Meyer is offline
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Sure, this code will add the MapPoint control to form1. (You still need to have the Control added to your project.)

'General Declarations Section
Dim WithEvents MPC As MappointControl

Private Sub Command1_Click()

Set MPC = Controls.Add("Mappoint.Control.9", "MappointControl1", Form1)

MPC.Move 1, 1, Form1.Width - 100, Form1.Height - 100
MPC.Visible = True
Set objMap = MPC.NewMap(geoMapNorthAmerica)

End Sub
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Reply With Quote