2 Replies - 4310 Views - Last Post: 25 July 2009 - 11:19 AM Rate Topic: -----

#1 sired22  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 25
  • Joined: 09-August 08

Drawing to the web browser control

Posted 28 October 2008 - 10:05 PM

I need a little help. What i am trying to do is basicly draw on the web browser control. my goal is to get it to display a rectangle around the html element your mouse is currently hovering over or when you click. This will be part of a bigger program i am working on. My current code below

        Try
            elm = wb.document.GetElementFromPoint(MousePosition)
            Me.Text = elm.TagName
            Dim Rect_Pen As New Pen(Color.Red, 50)
            Dim rect As Rectangle = elm.ClientRectangle
            Dim Area As Graphics
            Area = Graphics.FromHwnd(wb.Handle)
            Area.DrawRectangle(Rect_Pen, rect)
        Catch ex As Exception
            Me.Text = "bad"
        End Try



Currently that is in a timer

Is This A Good Question/Topic? 0
  • +

Replies To: Drawing to the web browser control

#2 sam_benne  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 16
  • View blog
  • Posts: 732
  • Joined: 16-January 08

Re: Drawing to the web browser control

Posted 01 November 2008 - 04:46 AM

So basically this is like paint that multiply users can use at the same time over the internet?
Was This Post Helpful? 0
  • +
  • -

#3 jinisopen  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 25-July 09

Re: Drawing to the web browser control

Posted 25 July 2009 - 11:19 AM

I did same...but it did't work....

I need at least 10,000 rects....so I must use GDI

but if you need hundres...you can use form object eg. label

Wb.Controls.add(label)....It works poor performance

......but...hundres..go OK
Was This Post Helpful? 1

Page 1 of 1