FlyInSky Posted October 6, 2006 Share Posted October 6, 2006 I want to create a Form,but It is need include a Child Form.I don't know how to do it. Its like MDI in VB . Who can Help me? Link to comment Share on other sites More sharing options...
Paulie Posted October 6, 2006 Share Posted October 6, 2006 I want to create a Form,but It is need include a Child Form.I don't know how to do it. Its like MDI in VB .Who can Help me?you mean GUICreate()See herehttp://www.autoitscript.com/autoit3/docs/f...s/GUICreate.htmlook at last parameter (Parent) Link to comment Share on other sites More sharing options...
FlyInSky Posted October 6, 2006 Author Share Posted October 6, 2006 I means the child form is inside of parent form.What can i do?thanks Link to comment Share on other sites More sharing options...
martin Posted October 7, 2006 Share Posted October 7, 2006 (edited) I means the child form is inside of parent form.What can i do?thanks Is this the sort of thing you want? #include <GUIConstants.au3> $gui=GUICreate("Parent", 800, 300,400,400,-1) $add2 = GUICtrlCreateButton('Add form',10,30) GUISetState(@SW_SHOW) $c1=GUICreate("child 1", 140, 180, 100, 100,$WS_OVERLAPPED) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($c1), "hwnd", WinGetHandle($GUI)) GUISetState() $c2 = 0;no 2nd child window yet do $msg = GUIGetMsg() if $msg = $add2 then if not $c2 then $c2=GUICreate("child 2", 140, 180, 120, 120,$WS_OVERLAPPED) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($c2), "hwnd", WinGetHandle($GUI)) GUISetState(@SW_SHOW) GUICtrlSetState($add2,$GUI_HIDE) EndIf EndIf if $msg = $GUI_EVENT_CLOSE Then ExitLoop until 0 Edited October 7, 2006 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
layer Posted October 7, 2006 Share Posted October 7, 2006 Is this the sort of thing you want? #include <GUIConstants.au3> $gui=GUICreate("Parent", 800, 300,400,400,-1) $add2 = GUICtrlCreateButton('Add form',10,30) GUISetState(@SW_SHOW) $c1=GUICreate("child 1", 140, 180, 100, 100,$WS_OVERLAPPED) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($c1), "hwnd", WinGetHandle($GUI)) GUISetState() $c2 = 0;no 2nd child window yet do $msg = GUIGetMsg() if $msg = $add2 then if not $c2 then $c2=GUICreate("child 2", 140, 180, 120, 120,$WS_OVERLAPPED) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($c2), "hwnd", WinGetHandle($GUI)) GUISetState(@SW_SHOW) GUICtrlSetState($add2,$GUI_HIDE) EndIf EndIf if $msg = $GUI_EVENT_CLOSE Then ExitLoop until 0you couldn't reply to my help topic http://www.autoitscript.com/forum/index.php?showtopic=33937 it's what i needed, thank you FootbaG Link to comment Share on other sites More sharing options...
martin Posted October 7, 2006 Share Posted October 7, 2006 you couldn't reply to my help topic http://www.autoitscript.com/forum/index.php?showtopic=33937 it's what i needed, thank you Uten gave you the answer in that thread! Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
layer Posted October 7, 2006 Share Posted October 7, 2006 (edited) well, sort of, i thought it was then i edited my post, i guess i could have made the edit more clear your way lets me do what Holger's code does except with your code i can use multiple GUI's created from AutoIt and get the same affect rather then a process with a window from Run() Edited October 7, 2006 by layer FootbaG Link to comment Share on other sites More sharing options...
FlyInSky Posted October 8, 2006 Author Share Posted October 8, 2006 (edited) First,I thank you.But I have some question about the code.Why not to use $WS_CHILD of GUI Control Styles Appendix ?How to hide the menu bar of the child in your code? Where have a handbook of "user32.dll"? Thank you! Edited October 8, 2006 by FlyInSky Link to comment Share on other sites More sharing options...
Zedna Posted October 8, 2006 Share Posted October 8, 2006 Where have a handbook of "user32.dll"? Thank you!http://msdn.microsoft.com/library/http://msdn2.microsoft.com/en-us/library/31d242h4.aspx Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now