# SetParent

Posted by 纪文和 on May 05, 1999 at 18:19:26:

In Reply to: 如何在执行时将SDI Form变更为MDI Child Form posted by Aaron Chiang on May 05, 1999 at 14:32:44:

: 我设计了一个DLL里面包含了几个Form，并由一个MDIForm reference，希望在执行时DLL里面的Form能像MDI Child Form，可是设计时不能将DLL的Form定义成MDI Child Form（执行时会出现错误讯息），所以必须在执行时变更，请问有没有办法解决

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

Follow Ups:

- Re: SetParent Aaron Chiang 14:34:22 5/17/99 (0)
- 我同意纪兄的做法, 但是... Sephiroth 13:20:36 5/06/99 (0)