[ACCEPTED]-How to change a Window Owner using its handle-owner
Accepted answer
I think you're looking for is to P/Invoke 1 SetWindowLongPtr(win32window, GWLP_HWNDPARENT, formhandle)
Yes! I've already have a P/Invoke import 7 of SetWindowLongPtr (which is x64 safe). And 6 using Reflector I searched upon the Form.Owner 5 property ( i.e. the get_Owner(Form value) method 4 ) and managed to change the owner with
SetWindowLongPtr(childHdl, -8, OwnerHdl)
I 3 was looking what the -8 (0xFFFFFFFFFFFFFFF8) meant 2 before I could post the solution here, but 1 Joel has already pointed it out.
Thanks!
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.