[/code] Im getting point position with this:
[code] Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim WebLoc As Point = PointToScreen(WebBrowser1.Location) Dim WebCurPos As Point = New Point(Cursor.Position.X - WebLoc.X, Cursor.Position.Y - WebLoc.Y) With WebCurPos If .X < 0 Or .Y < 0 Or .X > WebBrowser1.Width Or .Y > WebBrowser1.Height Then 'Debug.WriteLine("Mouse position outside of webbrowser!") Else Label1.Text = (WebCurPos.ToString) End If End With End Sub[/code] If i use zoom code to reduce to 25 the click not work if i use it with 100 works.

I think i need to divide my code of getting point but i dont know how."> [/code] Im getting point position with this:
[code] Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim WebLoc As Point = PointToScreen(WebBrowser1.Location) Dim WebCurPos As Point = New Point(Cursor.Position.X - WebLoc.X, Cursor.Position.Y - WebLoc.Y) With WebCurPos If .X < 0 Or .Y < 0 Or .X > WebBrowser1.Width Or .Y > WebBrowser1.Height Then 'Debug.WriteLine("Mouse position outside of webbrowser!") Else Label1.Text = (WebCurPos.ToString) End If End With End Sub[/code] If i use zoom code to reduce to 25 the click not work if i use it with 100 works.

I think i need to divide my code of getting point but i dont know how."> [/code] Im getting point position with this:
[code] Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim WebLoc As Point = PointToScreen(WebBrowser1.Location) Dim WebCurPos As Point = New Point(Cursor.Position.X - WebLoc.X, Cursor.Position.Y - WebLoc.Y) With WebCurPos If .X < 0 Or .Y < 0 Or .X > WebBrowser1.Width Or .Y > WebBrowser1.Height Then 'Debug.WriteLine("Mouse position outside of webbrowser!") Else Label1.Text = (WebCurPos.ToString) End If End With End Sub[/code] If i use zoom code to reduce to 25 the click not work if i use it with 100 works.

I think i need to divide my code of getting point but i dont know how.">
Hello, im using click.point to click in webbrowser control.

I've added zoom out (i need it for i can see all elements) my problem is if i keep the zoom at 100 works fine if i put zoom to 25 dont work.

Zoom code: [code]Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As EventArgs) Handles WebBrowser1.DocumentCompleted Try Dim Res As Object = Nothing Dim MyWeb As Object MyWeb = Me.WebBrowser1.ActiveXInstance MyWeb.ExecWB(Exec.OLECMDID_OPTICAL_ZOOM, ExecOpt.OLECMDEXECOPT_DONTPROMPTUSER, 25, IntPtr.Zero) Catch ex As Exception MsgBox("Error:" & ex.Message) End Try End Sub[/code] Im getting point position with this:
[code] Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Dim WebLoc As Point = PointToScreen(WebBrowser1.Location) Dim WebCurPos As Point = New Point(Cursor.Position.X - WebLoc.X, Cursor.Position.Y - WebLoc.Y) With WebCurPos If .X < 0 Or .Y < 0 Or .X > WebBrowser1.Width Or .Y > WebBrowser1.Height Then 'Debug.WriteLine("Mouse position outside of webbrowser!") Else Label1.Text = (WebCurPos.ToString) End If End With End Sub[/code] If i use zoom code to reduce to 25 the click not work if i use it with 100 works.

I think i need to divide my code of getting point but i dont know how.


JLCPCB – Prototype 10 PCBs for $2 (For Any Color)

China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir