Using Activex on a custom form,and handling events from an Add-in

  • Thread starter Ken Slovak - [MVP - Outlook]
  • Start date
K

Ken Slovak - [MVP - Outlook]

I know of no guidelines for writing ActiveX controls for Outlook
forms, and I don't believe you can handle form control events in a COM
addin.

Generally the events you can handle for a control on an Outlook form
are very limited.
 
T

tomer

Hi,

I need to use use a simple ListView control(multiple columns,checkboxes and
maybe icons as well)
I understand there are some problems using Activex control and handling
events.

Wonder if it is possible to handle the control events in my add in?
(will give me "early" binding,and the list of all events..?).

If not,assuming i am building a ListView control using ATL,is there any
guidlines
with which i can ensure proper behavior of my control when placing it on a
custom form?


Thanks in advance.
 
T

tomer

Ken,Thanks for your continues help.


Ken Slovak - said:
I know of no guidelines for writing ActiveX controls for Outlook
forms, and I don't believe you can handle form control events in a COM
addin.

Generally the events you can handle for a control on an Outlook form
are very limited.
 
T

Tom Rizzo [MSFT]

We had an old article in the Outlook 98 days which discussed writing Outlook
ActiveX controls in VB 5.0. If you search the archive of the MS website,
you may find that article which shows the advanced topics you will want to
know about. Robert Ginsburg wrote the article.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Michael Tissington

I have written a number of complex OCXs in VB6 ... if you have specific
questions post them and maybe I can help.
 
T

tomer

Thanks Tom.
BTW i am Enjoying Your book


Tom Rizzo said:
We had an old article in the Outlook 98 days which discussed writing Outlook
ActiveX controls in VB 5.0. If you search the archive of the MS website,
you may find that article which shows the advanced topics you will want to
know about. Robert Ginsburg wrote the article.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

tomer

Thanks,all i need to know if there are sepcific issues when writing
Activex for outlook,since i know that outlook can handle only a subset of
the control's event.
 
M

Michael Tissington

Specific issues are hard to define - it really depends on what you are going
to try to do.

One common issues is that you will not get a resize event when the HEIGHT
changes.
You'll get it for the width but not the height.

And if you need to commit your data when the user closes a form you'll have
to watch when you do it.
 
T

tomer

Thanks,that is a start....
I Understand that i can catch the Click event,
Now i wonder(still didnot check it) Does the click event is
an event which outlook create in the control(MSForms.Control?) which wrap
my activex control?
If so does outlook "convert" all my control events to a Click event?
does it "convert" only standard events to a Click event.
or does it only catch my activex "OnClick"(if defined)?

If outlook wrap all my event i can catch for example the WM_SIZE in my
control
and define OnSize event,which will become(mybe) OnClick
,Than i can access the control properties to get the dimension.

If outlook "convert" only standard event i sure want to know which are the
standard...

if outlook just uses my activex OnClick,than i can raise the OnClick for
every event i want
to handle,and than access the activex properties to get the real event

MyActivex_OnClick()

Event=MyActivex.EventId
Param0=MyActivex.Param(0)
Param1=MyActivex.Param(1)

select case Event
case OnClick:
case OnItemSelected:
end select

End



Thanks in advance.
 

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