Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WindowFromPoint API in .net

Status
Not open for further replies.

robdunfey

Technical User
Apr 26, 2002
110
0
0
GB
Hi,

I have an activex control that has many windows in it. When I call its hwnd method it just gives back the main 'wrapper' window. In VB I can get hold of the window I want by getting a point using GetCursorPos (API call) and passing the point to WindowFromPoint (API Call).

I see this article from MSDN that maps API calls to dot net equivilents...


It says the equivilent to WindowFromPoint is System.Windows.Forms.Form.GetChildAtPoint

But this returns the control? Not the window I'm interested in. Atleast I think it would? I am new to API and dotnet so please correct me if I have the wrong idea. But does anyone know how I can get the actual window inside an activex control the user clicks on?

Any help much appreciated,

Rob
 
just do the same api calls in vb.net as you did in the old vb, but then the .net way. shouldn't be that different from what you had.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanks for the reply Christiaan, but I thought there might be a dot net solution instead of resorting to using the API?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top