S
Sunny
Hi all,
My dev platform: VS .net 2003, win2000pro, office 2000, MOD 2000, C#.
Bellow you may read my posting in other group. According that issue, I have
dig around and I'm wondering ...
My code for creating the ActiveX control in C# is:
[GuidAttribute("0E887A3F-D8BA-4d0e-8781-EBFAE5820844"),
ProgId("MyApp.Options")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class IceOptions : System.Windows.Forms.UserControl,
Outlook.PropertyPage
......
So, it is exposed to COM interop, and outlook succeeds to initialize and
display it. The problem is that I can not reach the calling container and
its methods/properties.
If I stop the execution somewhere in my control, I can seen in debugger
that under this. there are some AcitveX related properties for my class
(like - ActiveXInstance {System.Windows.Forms.Control.ActiveXImpl}
System.Windows.Forms.Control.ActiveXImpl
).
How can I reach these properties in my code??? If I try:
mySite = (Outlook.PropertyPageSite)this.ActiveXInstance.clientSite is says:
'System.Windows.Forms.Control.ActiveXInstance' is inaccessible due to its
protection level
Is there a workaround?
Thanks for reading this![Smile :) :)](/styles/default/custom/smilies/smile.gif)
Sunny
P.S. Here is the main problem:
I'm trying to add custom property/option tab in Outlook 2000 Options. So far
I succeeded to create the control which implements Outlook.PropertyPage
interface. It displays OK, but I could not reference the parent
PropertyPageSite property to invoke OnStatusChange() method, so I can not
use Apply and OK buttons to apply changes.
I have read some articles in that direction, but all of them are not real
solution, and they are more than year old, so I'm wondering if so far
someone have succeeded in this approach?
Any suggestion/solution will be highly appreciated.
Thanks
Sunny
My dev platform: VS .net 2003, win2000pro, office 2000, MOD 2000, C#.
Bellow you may read my posting in other group. According that issue, I have
dig around and I'm wondering ...
My code for creating the ActiveX control in C# is:
[GuidAttribute("0E887A3F-D8BA-4d0e-8781-EBFAE5820844"),
ProgId("MyApp.Options")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class IceOptions : System.Windows.Forms.UserControl,
Outlook.PropertyPage
......
So, it is exposed to COM interop, and outlook succeeds to initialize and
display it. The problem is that I can not reach the calling container and
its methods/properties.
If I stop the execution somewhere in my control, I can seen in debugger
that under this. there are some AcitveX related properties for my class
(like - ActiveXInstance {System.Windows.Forms.Control.ActiveXImpl}
System.Windows.Forms.Control.ActiveXImpl
).
How can I reach these properties in my code??? If I try:
mySite = (Outlook.PropertyPageSite)this.ActiveXInstance.clientSite is says:
'System.Windows.Forms.Control.ActiveXInstance' is inaccessible due to its
protection level
Is there a workaround?
Thanks for reading this
![Smile :) :)](/styles/default/custom/smilies/smile.gif)
Sunny
P.S. Here is the main problem:
I'm trying to add custom property/option tab in Outlook 2000 Options. So far
I succeeded to create the control which implements Outlook.PropertyPage
interface. It displays OK, but I could not reference the parent
PropertyPageSite property to invoke OnStatusChange() method, so I can not
use Apply and OK buttons to apply changes.
I have read some articles in that direction, but all of them are not real
solution, and they are more than year old, so I'm wondering if so far
someone have succeeded in this approach?
Any suggestion/solution will be highly appreciated.
Thanks
Sunny