Embedding Forms

Started by dacarle, June 29, 2005, 03:06:14 PM

Previous topic - Next topic

dacarle

Is it possible to have a part of a form new form create by calling an existing form?

TechSupport

???? I don't know what you mean. The post title says embedding forms... do you mean to create a Form and have a Form as a child control on that Form (much like the child Forms that the Tab Control uses) ???

dacarle

sorry for confusion.  yes child control like on a tab control.  is it possible to have this without tab control?

TechSupport

Quote from: dacarlesorry for confusion.  yes child control like on a tab control.  is it possible to have this without tab control?
Yes, very easily by setting the WS_CHILD window style property of the Form that you want to display as embedded. You can display the embedded Form from the WM_CREATE message of the parent Form:

Function FORM1_WM_CREATE ( _
                        hWndForm As Dword, _  ' handle of Form
                        ByVal UserData As Long _  'optional user defined Long value
                        ) As Long

form2_show hWndForm, 0

End Function

You may also wish to uncheck the styles that display the Caption, SysMenu, Minimize, Maximize, etc... You should also change the StartupPosition to "0 - Manual".