EN / USD
32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
WebBrowser Point Zoom
TEP , The Engineering Projects , Calender Question: 07-Mar-2017
TEP , The Engineering Projects , Category In: Microsoft Visual Studio Projects
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.
TEP , The Engineering Projects , Icon Answer: 0 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.