vb.net - VB6 window over .NET window -


i have function in vb6 shows window (vb6 window). i'm calling function .net window. vb6 window appears correctly, it's on top , active. can write in it, change focus other control (using tab key), when click on window (vb6) i'm moved .net window (vb6 window goes back).

what wrong? i've tried set parent/owner/focus using winapi no results.

there no such thing "vb6 window" or "net window" - of these native windows different properties.

if focus gets stolen window messageqeue or window-inheritance isnt set correctly - practice have 1 main window , x child-windows, can add z-order them if want many windows ... win32-gimp uses that, doesnt right thats 2 cents.

you can pass hwnd of main window via parameter, doc should give insight on appropriate parameter-list : createwindow() ws_child necessary : window styles

and if want fire-and-forget solution : switch dialogs : dialogbox() --> create modal dialog, pretty solves of problems in 1 step ... special window, though - out-of-the-box functionality comes @ price ...


Comments