Click here to Skip to main content
15,894,180 members
Home / Discussions / C#
   

C#

 
GeneralRe: pass value from sub form to parent form Pin
Kristian Sixhøj21-Nov-07 9:07
Kristian Sixhøj21-Nov-07 9:07 
AnswerRe: pass value from sub form to parent form Pin
Skippums21-Nov-07 9:05
Skippums21-Nov-07 9:05 
AnswerRe: pass value from sub form to parent form Pin
DaveyM6921-Nov-07 9:19
professionalDaveyM6921-Nov-07 9:19 
GeneralRe: pass value from sub form to parent form Pin
Anthony Mushrow21-Nov-07 10:06
professionalAnthony Mushrow21-Nov-07 10:06 
QuestionHow to check/compare type of font used in txt/rtf Pin
shea85121-Nov-07 8:16
shea85121-Nov-07 8:16 
AnswerRe: How to check/compare type of font used in txt/rtf Pin
Anthony Mushrow21-Nov-07 8:25
professionalAnthony Mushrow21-Nov-07 8:25 
GeneralRe: How to check/compare type of font used in txt/rtf Pin
shea85121-Nov-07 8:31
shea85121-Nov-07 8:31 
QuestionHow can I catch the Mouse Click? Pin
Khoramdin21-Nov-07 7:56
Khoramdin21-Nov-07 7:56 
Hello everyone,

I have created a BHO using C#. The code works fine. I would like to detect mouse click on a particular bytton. The following is the SiteSet().

    public class BHO : IObjectWithSite<br />
    {<br />
        private SHDocVw.WebBrowser webBrowser;<br />
        private mshtml.HTMLDocument document;<br />
        private mshtml.IHTMLDocument2 document2;<br />
        private mshtml.HTMLElementEvents_Event events;<br />
<br />
public int SetSite(object site)<br />
        {<br />
            if (site != null)<br />
            {<br />
                webBrowser = (SHDocVw.WebBrowser)site;<br />
                webBrowser.DocumentComplete += new SHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete);<br />
                webBrowser.BeforeNavigate2 += new SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2);<br />
<br />
                webBrowser.OnQuit += new SHDocVw.DWebBrowserEvents2_OnQuitEventHandler(this.OnQuit);<br />
                webBrowser.NavigateComplete2 += new SHDocVw.DWebBrowserEvents2_NavigateComplete2EventHandler(this.NavigateComplete2);                       <br />
<br />
                events.onclick += new mshtml.HTMLElementEvents_onclickEventHandler(this.OnElementMouseClick);                <br />
<br />
            }


for the OnElementMouseClick function I have the following.

        public bool OnElementMouseClick()<br />
        {<br />
            MessageBox.Show("HelloWorld...");<br />
            return true;<br />
        }<br />
.<br />
.<br />
.<br />
.<br />


But nothing really happens! Am I wrong to think that the above code should give me HelloWorld message once a button is click?

Any information on this would be appriciated. Thank you very much.

Khoramdin
AnswerRe: How can I catch the Mouse Click? Pin
Not Active21-Nov-07 8:51
mentorNot Active21-Nov-07 8:51 
GeneralRe: How can I catch the Mouse Click? Pin
Khoramdin21-Nov-07 8:56
Khoramdin21-Nov-07 8:56 
GeneralRe: How can I catch the Mouse Click? Pin
Not Active21-Nov-07 10:08
mentorNot Active21-Nov-07 10:08 
GeneralRe: How can I catch the Mouse Click? Pin
Khoramdin21-Nov-07 12:21
Khoramdin21-Nov-07 12:21 
Questionhow I can insert image into sqlserver database with c# Pin
yemen_programmer21-Nov-07 7:04
yemen_programmer21-Nov-07 7:04 
Questionhow I can insert image into sqlserver database with c# Pin
yemen_programmer21-Nov-07 6:54
yemen_programmer21-Nov-07 6:54 
AnswerRe: how I can insert image into sqlserver database with c# Pin
Giorgi Dalakishvili21-Nov-07 7:03
mentorGiorgi Dalakishvili21-Nov-07 7:03 
AnswerRe: how I can insert image into sqlserver database with c# [modified] Pin
Khoramdin21-Nov-07 8:44
Khoramdin21-Nov-07 8:44 
QuestionCreate Shortcut in C# for Vista Pin
Phoen2521-Nov-07 6:30
Phoen2521-Nov-07 6:30 
AnswerRe: How to Open Url Pin
Anthony Mushrow21-Nov-07 6:04
professionalAnthony Mushrow21-Nov-07 6:04 
Question[Message Deleted] Pin
Shani Aulakh21-Nov-07 5:43
Shani Aulakh21-Nov-07 5:43 
AnswerRe: C#: Method help Pin
Judah Gabriel Himango21-Nov-07 5:59
sponsorJudah Gabriel Himango21-Nov-07 5:59 
AnswerRe: C#: Method help Pin
Anthony Mushrow21-Nov-07 6:08
professionalAnthony Mushrow21-Nov-07 6:08 
AnswerRe: C#: Method help Pin
J4amieC21-Nov-07 6:36
J4amieC21-Nov-07 6:36 
GeneralRe: C#: Method help Pin
Anthony Mushrow21-Nov-07 7:53
professionalAnthony Mushrow21-Nov-07 7:53 
QuestionI need a Sample code! Pin
Davood Riazi21-Nov-07 5:00
Davood Riazi21-Nov-07 5:00 
AnswerRe: I need a Sample code! Pin
Colin Angus Mackay21-Nov-07 5:32
Colin Angus Mackay21-Nov-07 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.