Knowledge Base



KB10313 - DK.ActiveX viewer control property HWND.

The XDK viewer control property HWND is used, for example:

  Dim myhdc As System.IntPtr
  Dim newGraphics As Graphics
  Dim pen As New System.Drawing.Pen(System.Drawing.Color.Red, 1)

  myhdc = IntPtr.op_Explicit(GIS.HWND())
  newGraphics = Graphics.FromHdc(myhdc)

  try
    new Graphics.DrawEllipse(pen, 0, 0, 100, 100)
    pen.Dispose()
  Catch eIdraw As System.Exception
    MsgBox("There was a problem drawing the image." &
      vbNewLine & eIdraw.Message, MsgBoxStyle.OKOnly, "Application")
  End Try

GIS is the viewer control name.

Created: November 21, 2003, Modified: December 21, 2015
follow us on Facebook  follow us on Twitter  follow us on Google +  follow us on LinkedIn  Embarcadero