By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

How to derive from Outlook.Inspector in c#?

P: n/a
Hi,

I try to build an Outlook Plugin. After having some trouble with the
Inspectorevents I'm trying to build a wrapper for the Inspectorclass.

However I'm stuck again after letting VS.Net 2003 create the stubs for the
Inspector-Interface.

When I try to compile the new Wrapperclass it says

"An explicit interface implementation of an event must use property syntax"
for both lines

"event Outlook.InspectorEvents_10_CloseEventHandler
Outlook.InspectorEvents_10_Event.Close;"

and

"event Outlook.InspectorEvents_10_ActivateEventHandler
Outlook.InspectorEvents_10_Event.Activate;"
When I change it to
"event Outlook.InspectorEvents_10_CloseEventHandler Close;"
it says
"The class 'HelloWorld.InspectorWrapper' already contains a definition for
'Close'"
How can I get my hands on "Outlook.InspectorEvents_10_Event.Close"?

Any Hint greatly appreciated
------ cut here ----
using System;

namespace HelloWorld
{
/// <summary>
/// Summary description for InspectorWrapper.
/// </summary>
public class InspectorWrapper : Outlook.Inspector
{
public InspectorWrapper()
{
//
// TODO: Add constructor logic here
//
}

#region _Inspector Members

public void Close(Outlook.OlInspectorClose SaveMode)
{
// TODO: Add InspectorWrapper.Close implementation
}

public void Activate()
{
// TODO: Add InspectorWrapper.Activate implementation
}

// ...
#endregion

#region InspectorEvents_10_Event Members

public event Outlook.InspectorEvents_10_BeforeSizeEventHandler BeforeSize;

public event Outlook.InspectorEvents_10_BeforeMaximizeEventHand ler
BeforeMaximize;

public event Outlook.InspectorEvents_10_BeforeMoveEventHandler BeforeMove;

event Outlook.InspectorEvents_10_CloseEventHandler
Outlook.InspectorEvents_10_Event.Close;

public event Outlook.InspectorEvents_10_DeactivateEventHandler Deactivate;

event Outlook.InspectorEvents_10_ActivateEventHandler
Outlook.InspectorEvents_10_Event.Activate;

public event Outlook.InspectorEvents_10_BeforeMinimizeEventHand ler
BeforeMinimize;

#endregion
}
}


Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.