home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{52DE3A21-0A3F-11D4-B9D2-008048FD54E6}#2.0#0"; "POLARDraw20.ocx"
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Form1"
- ClientHeight = 8670
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 9360
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 8670
- ScaleWidth = 9360
- StartUpPosition = 3 'Windows Default
- Begin POLARDRAW20Lib.POLARDraw POLARDraw1
- Height = 8595
- Left = 0
- TabIndex = 2
- Top = 30
- Width = 7995
- _Version = 131072
- _ExtentX = 14102
- _ExtentY = 15161
- _StockProps = 224
- PaperShadowColor= 0
- PaperOutlinecolor= 22875532
- DrawPaperOutline= -1 'True
- DrawPaperShadow = -1 'True
- PaperShadowOffset= 0
- ViewportOriginX = 22875532
- ViewportOriginY = 22878684
- PageOriginX = 1
- PageOriginY = 124523749
- HorizontalGrid = 567
- VerticalGrid = 567
- SelectionCount = 22740992
- ShapeCount = 22742704
- CanvasWidth = 536873485
- CanvasHeight = 0
- End
- Begin VB.CommandButton btnTree
- Caption = "Tree"
- Height = 465
- Left = 8085
- TabIndex = 1
- Top = 645
- Width = 1200
- End
- Begin VB.CommandButton btnLight
- Caption = "Traffic Light"
- Height = 465
- Left = 8085
- TabIndex = 0
- Top = 105
- Width = 1200
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim m_pdPage As POLARDRAW20Lib.Page
- Private Sub btnLight_Click()
- AddObject "semaphore.emf"
- End Sub
- Private Sub btnTree_Click()
- AddObject "tree.emf"
- End Sub
- Private Sub Form_Load()
- Set m_pdPage = POLARDraw1.ActivePage
- Dim pd_street As POLARDRAW20Lib.Shape
- POLARDraw1.EnableRendering = False
- Set pd_street = m_pdPage.Shapes.AddPicture(App.Path + "\street.emf", 0, 0, m_pdPage.Width, m_pdPage.Height)
- With pd_street
- .AddToSelection
- .Lock.AgainstSelection = True
- End With
- m_pdPage.Selection.Clear
- m_pdPage.ShowPaper = False
- POLARDraw1.ActiveWindow.FitTo polFitToPage
- POLARDraw1.EnableRendering = True
- Set pd_street = Nothing
- End Sub
- Private Sub AddObject(FileName As String)
- Dim pd_object As POLARDRAW20Lib.Shape
- POLARDraw1.EnableRendering = False
- Set pd_object = m_pdPage.Shapes.Add(polRectangle, 0, 0, 30, 45)
- With pd_object
- .IsFilled = True
- .Fill.Type = polPicture
- .Fill.SetPictureFromFile App.Path + "\" + FileName
- .HasLine = False
- End With
- POLARDraw1.EnableRendering = True
- POLARDraw1.Render
- Set pd_object = Nothing
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Set m_pdPage = Nothing
- End Sub
-