开发者

Use a window handle as an owner for a VB6 form

What is the Win32 equivalant of Form2.Show vbModeless, Form1 that allows me to set the owner (not the parent) to an arbitrary hWnd and set the default position, etc?

As far as I'm aware, this can only be 开发者_开发技巧set when creating a window.


I'm not sure what you are trying to accomplish, but I think you might be looking for the SetParent function.

Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

hWndChild is the handle to the child window.
hWndNewParent is the handle to the new parent. Pass null (0 if I remember correctly) to make the desktop the owner.

You can find more information about it here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜