Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi,
Click on the photo in webBrowser?

C#
HtmlElementCollection image = webBrowser1.Document.Images;
foreach (HtmlElement item in image)
{
    item.Click += delegate { MessageBox.Show("Test"); };
}
Posted
Comments
Thomas Daniels 1-Dec-12 12:38pm    
Why do you post an answer in your question?
I tried your code, and it's working.
samadblaj 1-Dec-12 13:17pm    
My code is correct.
Please help me!
Thomas Daniels 1-Dec-12 13:18pm    
Help with what?
If your code is correct, why do you need help?
Nelek 1-Dec-12 13:59pm    
Just drop it. You don't need to understand everything ;P
samadblaj 1-Dec-12 14:12pm    
HtmlElementCollection image = webBrowser1.Document.Images;
foreach (HtmlElement item in image)
{
item.Click += delegate { click image ??? };
}

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