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.