locked
form dimension is small, and i cant find my polygon RRS feed

  • Question

  • please i need help to find my polygon. or if you have any suggestions on how to draw large dimension polygons such as this one.

    and if its possible to zoom in or out in order to find the polygon.

    these are the codes

    Public Class Form4
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            'declare variables of local scope
            Dim myGraphics As Graphics
            Dim myPoints() As Point
    
            'return the current form as a drawing surface
            myGraphics = Graphics.FromHwnd(hwnd:=ActiveForm().Handle)
    
            'create a 7-item array of point structures in order of connection
            ReDim myPoints(6)
            myPoints(0) = New Point(15, 20)
            myPoints(1) = New Point(25, 15)
            myPoints(2) = New Point(35, 20)
            myPoints(3) = New Point(35, 40)
            myPoints(4) = New Point(25, 45)
            myPoints(5) = New Point(15, 40)
            myPoints(6) = New Point(15, 20)
    
            'draw the polygon (connect the dots between the points in the array)
            myGraphics.DrawPolygon(pen:=New Pen(Color.Blue, width:=2),
       points:=myPoints)
    
            'create a new 7-item array 
            ReDim myPoints(6)
            myPoints(0) = New Point(588345.433, 703456.345)
            myPoints(1) = New Point(588353.098, 703465.123)
            myPoints(2) = New Point(588335.122, 703470.067)
            myPoints(3) = New Point(588215.321, 703490.678)
            myPoints(4) = New Point(588325.008, 703395.126)
            myPoints(5) = New Point(588335.467, 703390.442)
            myPoints(6) = New Point(588415.987, 703370.345)
    
            'draw the polygon (connect the dots between the points in the array)
            myGraphics.DrawPolygon(pen:=New Pen(Color.Blue, width:=2),
       points:=myPoints)
    
        End Sub
    End Class

    or if there is any way to locate the drawing.

    Thursday, September 15, 2016 3:18 PM

Answers

All replies