Home All Groups Group Topic Archive Search About

Controls question (System.ComponentModel.Design)

Author
22 Nov 2004 7:15 AM
Serg
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!

Author
22 Nov 2004 1:26 PM
RBischoff
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>
Author
22 Nov 2004 6:45 PM
Serg
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


Show quote
"RBischoff" wrote:

> 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>
>
>
Author
22 Nov 2004 8:17 PM
RBischoff
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>
Show quote
S> "RBischoff" wrote:
S>
>> 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>
Author
22 Nov 2004 10:29 PM
Serg
Sorry, I meant when users are writing code vs running the code.... not when I
am designing it.


Show quote
"RBischoff" wrote:

> 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>
> >> 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>
>
>

AddThis Social Bookmark Button