IViewObject - Custom Infopathcontrol

E

Eric Lacroix

Dear Microsoft,

I'm try to build a custom Activex control in C# that will be use into
infopath for our UI document process. The control itself work fine except
that i need put in place some custom draw when the user request the print or
printpreview functionnality from infopath.

So i try to implement the IViewObject and IViewObject2 without any success.
Could someone send me some cue on how to resolve this issue. Or any cue that
i could get a notification on the print event so i will be able to change
the control content.

Here is my object declaration :

[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces(typeof(IPropertyNotifySink))]
public partial class InfoPathControl : UserControl, IInfoPathControl,
IObjectSafety, IViewObject, IViewObject2,
Microsoft.Office.Interop.InfoPath.InfoPathControl
.....


[Guid("6131B4BE-2A29-475c-A4A5-80DA928C7FB4")]
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces(typeof(IPropertyNotifySink))]
public partial class InfoPathPictureInkControl :
Infopath.Controls.InfoPathControl
....

[ComImport]
[Guid("0000010d-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IViewObject
....

[ComImport]
[Guid("00000127-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IViewObject2
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top