Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have a c# application and an embedded browser in it.
Its task is to find a link and then right click on it and click on properties! mouse moves programmatically so i need to find properties in righ click menu! Can you help me how to do this? I tried pressing 'r' after right click, but it didn't work on some computers! So i need to do it by moving mouse! Here is my code for finding a link and right clicking:
C#
int x = getXoffset(link);
int y = getYoffset(link);
webBrowser1.Document.Window.ScrollTo(x, y);
Linker.Win32.POINT p2 = new Linker.Win32.POINT();
webBrowser1.Focus();
p2.x = webBrowser1.Left + 10;
p2.y = webBrowser1.Top + 5;
Linker.Win32.ClientToScreen(this.Handle, ref p2);
Linker.Win32.SetCursorPos(p2.x, p2.y);
MouseOperations.GetCursorPosition();
MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.LeftDown);
MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.RightDown);
MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.RightUp);



can any one help me?or any other idea for reaching properties on right click meny is welcomed
Tanx
Posted
Updated 29-Aug-12 8:23am
v2
Comments
Nueman 29-Aug-12 14:18pm    
Please edit your question and use the space bar to separate sentences. Your post is very hard to read. Thanks.
khangaldi 29-Aug-12 14:27pm    
im so sorry about that
Nueman 29-Aug-12 14:43pm    
No problem with me. :) I am just trying to help you get an answer to your question. You have to consider the people that will be reading your question and use appropriate spacing, punctuation, and capitalization.
Zoltán Zörgő 30-Aug-12 0:40am    
I can not imagine, what is the purpose of this. Perhaps there is a more simpler way to achieve what you want, without webbrowser. Could you tell us, what's the goal of the project?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900