PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: dacarle on June 29, 2005, 03:06:14 PM

Title: Embedding Forms
Post by: dacarle on June 29, 2005, 03:06:14 PM
Is it possible to have a part of a form new form create by calling an existing form?
Title: Embedding Forms
Post by: TechSupport on June 29, 2005, 03:24:32 PM
???? 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) ???
Title: Embedding Forms
Post by: dacarle on June 29, 2005, 03:35:28 PM
sorry for confusion.  yes child control like on a tab control.  is it possible to have this without tab control?
Title: Embedding Forms
Post by: TechSupport on June 29, 2005, 10:13:10 PM
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".