In my windows application,i embed a Com webbrowser control.In DocumentComplete Event i add thid code:"Event= (HTMLDocumentEvents2_Event)axWebBrowser1.Document;Event.onclick += new mshtml.HTMLDocumentEvents2_onclickEventHandler(ClickEventHandler);" the ClickEventHandler function is defined as : private bool ClickEventHandler(mshtml.IHTMLEventObj e) { MessageBox.Show(e.type + ":" + e.srcElement.tagName); return true; } Now the problem is,when i first load a html file,it work correctly,but when i load a new file again,the MessageBox appear twice,load third file,it appear three time,and so on.So,What can i do to get rid of it,Let the message just appear one time. I will appreciate you help!
nakey_yang
Posts
-
How to prevent WebBrowser control correspond to click event twice after loads html file twice? -
How to realize Web control's context menu by c#:zzz:somebody tell me can use IDocHostUIHandler can relize this idea,but how can do this by c#? ok
-
How to Serialize object's property by its Categoryi kown,bu i don't know why the xml tag became disappeared! ok
-
How to Serialize object's property by its Categoryi know ,but i didn't know why this xml tag do disappear? ok
-
How to Serialize object's property by its Categorypublic class Test { private int num1; private int num2; private int num3 [CategoryAttribute("BlackGround")] public int Num1 {get{return num1;} set{num1=value;}} [CategoryAttribute("BlackGround")] public int Num2 {get{return num2;} set{num2=value;}} [CategoryAttribute("ForeGround")] public int Num3 { get{return num3;} set{num3=value;} }} How get the Serialization result as below? .. .. .. ok
-
How configure html componet's property and save it as xml file?:confused:Now i want to configure html compont's property such as < input type='text'>'s backgroundcolor and save it as xml file,how can i do? ok
-
How to use proertyGrid to show html componet's property?We know we can use propertyGrid to configure object,but how can we use it to configure html component's property such 's property.This condition is like ASP.NET'S develop entironment??:confused: ok
-
how can i get element's content by css?we can get element's style such as color and so on,by how can we get element's content by css?Recently,i found css2.1 can do so: h1:before { display: block; text-align: center; white-space: pre; content: "chapter\A hoofdstuk\A chapitre" } by IE6.0 don't support css2.1,How can i do?:confused: ok
-
how to increase height upwards and width towards leftBy default,such as img element,when we increase its height,it extend downwards and increase width leftwords.How can i change it,that is ,i need it to extend upwards when i increase its height? 谢谢你的帮助
-
how do i add my htc to vml ?nobody can help me?:((:(( ok
-
how do i add my htc to vml ?when i add my own htc file "Size.htc" to vml sentence,the picture become disappeared.why?? following is the code:
-
MR. Heath Stewart come in pleasethanks you!Now the thing confused my head is that my web component can changed its surface when the data it bound to,but how can i make the same change apperaed in client connected with the server? 您的帮助将使我受益匪浅!
-
MR. Heath Stewart come in pleaseNow,i am decided to design Web component.Just as you say above if we design winfrom component we can use web servers,DCOM and so on,but when i do web component,how can i keep communication between client and server don't use to refresh.For example when i use DataGrid web component ,how can i update its data in client side without using refresh to connect to server side. 感谢你的帮助!!!
-
MR. Heath Stewart come in pleasei see. Now i am designing a application that enable users as server side can configurate some componets on the platform (just a winapplication embedded browser i said first time) the users as client side can watch the results.As you know the client side should comunication with server realtime to get data. Cmmonly we can refresh the browser to link to the server to get data,but when application need do this per 2 second this method cann't been used.Now i am confused about whether to design web components(how keep communicaion between server and client in background process) or winform component (use DCOM to keep their communicaion?anyother method?) .So, please give me some advice. thank you. 非常感谢您的帮助
-
MR. Heath Stewart come in pleaseI know you mean,that is use winform control in web application.The method just as using ActiveX in web. But the .net framework is required in client. Did you mean we can move the control in web using the method you tell about a week ago? thank you!
-
MR. Heath Stewart come in pleaseif i put a div element on the face of browser and set webconpontnet on the div, through this method can get the same result? ok
-
MR. Heath Stewart come in pleaseI found www.thecodeproject.com just before a week.Next week i asked a question "how to control web components in winform by embeding a browser(ie)" and i didn't thought so many people have took focus on it.So i am appriciated your help.But i am a beginner of programmer,so can you offer me a specific application example that is windows applicatin embeded a browser and we can draw Web componet such as TextBox on the browser interface?thank you for your help very much. myEmail:kiss1979@sohu.com ok
-
how to control web components in winform by embeding a browser(ie):confused:in my windows application,i embeded a web browser,by this method we can show web component.But i want control this component such as draw to a new position.How can i do this.Help :)