Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How 2 get Object Ref from WindowHandle
Message
From
12/08/2003 13:35:36
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00819424
Message ID:
00819483
Views:
12
>Yanick,
>
>Did you try
oExcel = GETOBJECT(, "Excel.Application")
>
>>>
>>>>I need to get an object reference from the handle returned by FindWindow. Is that feasable?
>>>
>>>Can you iterate the _screen.Forms[] collection looking for a matching HWND property?
>>
>>
>>I don't think I can since the object I need to refer to is outside VFP (it's an instance of Excel)
>>
>>Yanick

Thanks for the idea Sergey,

I tought of that one but then, several instances of excel might be running... thru the WindowHandle I would be sure to have a reference to the right Excel Instance. I can check WITH oXL.caption to make sure if I'm dealing with the right one but if that isn't the correct instance Is there a way I could reference other instances with GETOBJECT or will it always default to the first Excel that got open?

Please keep the ideas coming.

Have a good one,

Yanick
Previous
Reply
Map
View

Click here to load this message in the networking platform