Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# COM
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 19:30pm
Edited 1-Aug-12 19:34pm
v2
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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);
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 15 Sep 2012
Copyright © CodeProject, 1999-2014
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