I have a AxAcroPDF on a from which i added from the toolbox
I can draw on the form using this code
Is it possible to draw directly onto the AxAcroPDF Control?Code:Private m_Drawing As Boolean = False Private m_LastPoint As Point = Nothing ' Start drawing. Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e _ As System.Windows.Forms.MouseEventArgs) Handles _ Me.MouseDown m_Drawing = True m_LastPoint = New Point(e.X, e.Y) Dim gr As Graphics = Me.CreateGraphics() gr.Clear(Me.BackColor) End Sub ' Continue drawing. Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e _ As System.Windows.Forms.MouseEventArgs) Handles _ Me.MouseMove If Not m_Drawing Then Exit Sub Dim gr As Graphics = Me.CreateGraphics() gr.DrawLine(Pens.Blue, m_LastPoint, New Point(e.X, e.Y)) m_LastPoint = New Point(e.X, e.Y) End Sub ' Stop drawing. Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e _ As System.Windows.Forms.MouseEventArgs) Handles _ Me.MouseUp m_Drawing = False End Sub
The AxAcroPDF Control dosnt have the mouseup and mouse down declatations so i am unable to easily adapt the code.
regards
toe




Reply With Quote