gem56
asked on
How to determine VB.NET application's active MDI child window handle from VB6
Hi guys,
I have a VB6 application that interacts a VB.NET application. From VB6 application I'm able to determine VB.NET application's main/MDI container window handle but I'm unable to determine its active MDI child window handle, i.e. the equivalent of "Me.ActiveMdiChild' in VB.NET.
I've tried using GetForegroundWindow and GetActiveWindow API's (from VB6 after using SetForegroundWindow API to VB.NET application) but neither return the correct value. The GetForegroundWindow returns main/MDI container window handle and GetActiveWindow returns 0.
Thanks
I have a VB6 application that interacts a VB.NET application. From VB6 application I'm able to determine VB.NET application's main/MDI container window handle but I'm unable to determine its active MDI child window handle, i.e. the equivalent of "Me.ActiveMdiChild' in VB.NET.
I've tried using GetForegroundWindow and GetActiveWindow API's (from VB6 after using SetForegroundWindow API to VB.NET application) but neither return the correct value. The GetForegroundWindow returns main/MDI container window handle and GetActiveWindow returns 0.
Thanks
This may not be possible since VB.NET doesn't use the Windows API, but the .NET Framework.
ASKER
Currently in VB6 I'm using API's such as GetWindow (to get window Owner), GetWindowLong (to get window 'Styles'), etc. to obtain information about VB.NET application windows so I thought there may be a way of using an API to somehow determine the active MDI but perhaps not!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works like a charm eql1044, thanks.