Controls question (System.ComponentModel.Design)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello - 2 questions:

1. I am writing a control which hosts an IE control (AxWebBrowser). As a
result of IE being on my control, the control does not get events such as
right click, left click, ect when clicking inside IE. What can I do here?

2. If I could determine if I am in "design mode", then this would solve my
problem #1 above (I wouldn't load IE if I am in design). However DesignMode
property is always false. Is there another way to determine what mode the
control is?

Thanks!
 
Hello Serg,

Re: #1, theoretically you should be able to handle the mouse click event, but you'll have to get this via mshtml . An example is here http://support.microsoft.com/kb/312777/EN-US/

Best of luck!

Your C# ally ,
RBischoff


S> Hello - 2 questions:
S>
S> 1. I am writing a control which hosts an IE control (AxWebBrowser).
S> As a result of IE being on my control, the control does not get
S> events such as right click, left click, ect when clicking inside IE.
S> What can I do here?
S>
S> 2. If I could determine if I am in "design mode", then this would
S> solve my problem #1 above (I wouldn't load IE if I am in design).
S> However DesignMode property is always false. Is there another way to
S> determine what mode the control is?
S>
S> Thanks!
S>
 
Thanks for replying RBischoff. I am able to SetSite to my control so I can
get mouse events, the question how do I forward them to the underlying
control so that the underlying control exhibits its default behaviour (such
as being selected, right click shows dev studio's menu, and so on).

Thanks again
 
Hello Serg,
Can you just use this attribute on your class control (the one with IE ActiveX control)?

[DesignTimeVisible(false)]
public class YourClassWithIECtrl()




Best of luck!

Your C# ally ,
RBischoff


S> Thanks for replying RBischoff. I am able to SetSite to my control so
S> I can get mouse events, the question how do I forward them to the
S> underlying control so that the underlying control exhibits its
S> default behaviour (such as being selected, right click shows dev
S> studio's menu, and so on).
S>
S> Thanks again
S>
S> "RBischoff" wrote:
S>
 
Sorry, I meant when users are writing code vs running the code.... not when I
am designing it.


RBischoff said:
Hello Serg,
Can you just use this attribute on your class control (the one with IE ActiveX control)?

[DesignTimeVisible(false)]
public class YourClassWithIECtrl()




Best of luck!

Your C# ally ,
RBischoff


S> Thanks for replying RBischoff. I am able to SetSite to my control so
S> I can get mouse events, the question how do I forward them to the
S> underlying control so that the underlying control exhibits its
S> default behaviour (such as being selected, right click shows dev
S> studio's menu, and so on).
S>
S> Thanks again
S>
S> "RBischoff" wrote:
S>
 
Back
Top