Author Topic: Exposing .NET events to COM  (Read 2701 times)

0 Members and 1 Guest are viewing this topic.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Exposing .NET events to COM
« on: August 07, 2006, 07:50:17 PM »
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?
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: Exposing .NET events to COM
« Reply #1 on: August 08, 2006, 02:00:14 AM »
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.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien