Window.Handle as pointer?

Hi everyone,

I’m working with a legacy Active-X control that needs a window handle. But when I pass in Window1.Handle, I receive the error:

Parameter "hWnd_Param" expects type Ptr, but this is type Integer.

How do I get a pointer to the Window handle?

Ptr(Window.Handle) ?

Not an answer, but curious…

How old is it?
Is it expecting a 32bit value and getting a 64bit one?

Ah! Didn’t realize you could cast to a pointer that way. Thanks!

[quote=372143:@Jeff Tullin]How old is it?
Is it expecting a 32bit value and getting a 64bit one?[/quote]

It’s an old control, but on Windows I really only compile for 32-bit anyway, so no big deal there.

Integer and Ptr are both 32 or 64-bit depending on the app’s bit number.

Agreed, but I was curious about whether the ActiveX was 32 bit while the app was 64

that will simply not work.