sanhen 0 Report post Posted December 2, 2008 (edited) #include <GUIConstants.au3> #include <WindowsConstants.au3> #Include <WinAPI.au3> Global Const $GWL_STYLE = -16 $hGUI=GUICreate ("Test",800,600,-1,-1,BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) $button = GUICtrlCreateButton ("Test ",700,500,70,30) GUISetState( ) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $button Run("notepad.exe") $hWndChild = WinGetHandle("classname=Notepad" , "") _WinAPI_SetWindowLong($hWndChild, $GWL_STYLE ,BitOR($WS_VISIBLE, $WS_CLIPSIBLINGS)) _WinAPI_SetParent($hWndChild,WinGetHandle($hGUI)) EndSwitch WEnd Did not respond to code.why? Edited December 2, 2008 by sanhen Share this post Link to post Share on other sites
martin 68 Report post Posted December 2, 2008 Try #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Opt("WinTitleMatchMode", 2) Global Const $GWL_STYLE = -16 $hGUI = GUICreate("Test", 800, 600, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) $button = GUICtrlCreateButton("Test ", 700, 500, 70, 30) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $button Run("notepad.exe") Sleep(1000) $hWndChild = WinGetHandle("Notepad") _WinAPI_SetWindowLong($hWndChild, $GWL_STYLE, BitOR($WS_VISIBLE, $WS_CLIPSIBLINGS)) _WinAPI_SetParent($hWndChild, WinGetHandle($hGUI));needs redraw to refresh menu items for me EndSwitch WEnd 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. Share this post Link to post Share on other sites