Click here to Skip to main content
13,248,369 members (39,907 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Guys I really need some help here, my application should do the following:

- Create a tool bar button( i could do it with registry changes)

- Tool bar button when clicked should invoke a c# code that injects Javascript code(I am having a problem here, how to get the tool bar button events reflected in C# code)

- C# code that will inject the Javascript into web page (I developed this using some on-line resources of BHO programming and I was successful)

Please please please help
Posted 1-Aug-12 20:30pm
Updated 1-Aug-12 20:34pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You might use a WebBrowser class to do this.
When you initialise it, you can apply any java script.
for example:
object[] script = { "alert('Hello world!')" };
[your_web_browser_object].Document.InvokeScript("eval", script);

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 15 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100