Code Red > .NET

Exposing .NET events to COM

(1/1)

mohnston:
As I continue to think about the drag/jig issue and .NET and COM I can't help but wonder if what I really want is just a hook onto the cursor.
If that hook was feeding coordinates to VBA via an event then I could just take care of the rest in VBA. (or VB)
I like the idea of doing all the rest (insert, rotate etc.) in VBA because that lets me be more creative in what I can use it for.

Is exposing a .NET event to COM (VBA) possible?
Will I run into problems passing .NET data types to COM? (so far I know strings and doubles work)

Any thoughts, suggestions, mockery?

MickD:
If you can pass strings and doubles, maybe all you need to pass is a bool for the event (if req'd) and the mouse x & y int's.
I have read somewhere how to create an activex component out of a .net dll using regasm (it registers your dll with the registry to be used as a COM component) and certain attributes in your assembly. Another way is to use TlbExp to export the type lib.
That may be a start for you anyway, sorry I can't be more help.

Navigation

[0] Message Index

Go to full version