sandin Posted July 28, 2008 Share Posted July 28, 2008 (edited) I have this script: #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $FormMain = GUICreate("Test", 633, 441, 10, 10) $button1 = GUICtrlCreateButton("Child_1", 100, 400, 100, 20) $button2 = GUICtrlCreateButton("Child_2", 400, 50, 100, 20) GUISetState(@SW_SHOW) $Form2 = GUICreate("Child", 100, 300, 10, 10, $WS_CHILD, -1, $FormMain) $label1 = GUICtrlCreateLabel("Test Label1", 5, 5, 90) GUICtrlSetBkColor(-1, 0xFFFFFF) $label2 = GUICtrlCreateLabel("Test Label2", 5, 270, 90) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetBkColor ( 0xFF0000) GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit case $button1 _show_child_window(ControlGetHandle($FormMain, "", $button1)) case $button2 _show_child_window(ControlGetHandle($FormMain, "", $button2)) EndSwitch WEnd func _show_child_window($button_handle) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 500, "long", 0x00050008) GUISetState(@SW_HIDE, $Form2) $position = ControlGetPos($FormMain, "", $button_handle) WinMove($Form2, "", $position[0], $position[1]+$position[3]) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 500, "long", 0x00040004) GUISetState(@SW_SHOW, $Form2) EndFunc is it possible to make a child on button1, display outside of it's parent, but still movable when user move the parent window? Edited July 29, 2008 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
sandin Posted July 29, 2008 Author Share Posted July 29, 2008 can someone help me on this one? All I need is for child (red) window is to be displayed outside of it's parent window, and I want it to be movable together with parent window when I move the parent. Thank you. Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
TerarinKerowyn Posted July 29, 2008 Share Posted July 29, 2008 Can you wait at least a day before you *bump* your topic, very rude if you ask me Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah Link to comment Share on other sites More sharing options...
sandin Posted July 29, 2008 Author Share Posted July 29, 2008 I'm sorry, I didn't meant to be rude Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
sandin Posted July 30, 2008 Author Share Posted July 30, 2008 has anyone found a solution for this issue? I haven't ;/ Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
TerarinKerowyn Posted July 30, 2008 Share Posted July 30, 2008 $Form2 = GUICreate("Child", 100, 300, 10, 10, $WS_CLIPCHILDREN, $WS_EX_MDICHILD + $WS_EX_TOOLWINDOW, $FormMain) if you don't like the border then you can change the back to $WS_CHILD after the move just check until the person right click on the control and then change the thing to whatever you wanted $WS_EX_MDICHILD and $WS_CLIPCHILDREN make it so you don't have a X to close it Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah Link to comment Share on other sites More sharing options...
sandin Posted July 30, 2008 Author Share Posted July 30, 2008 (edited) thank you, it really goes outside of parent, but it's not moving together with parent when I move parent, it disappear when I move the parent, and when I click on button again, it appears on some other place, not bellow button (original spot of button when GUI was created). Edited July 30, 2008 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
Madza91 Posted July 31, 2008 Share Posted July 31, 2008 Here is my little help: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GuiCreate("Test", 300, 200) $ChildGui = GuiCreate("Child test", 75, 23, -1, -1,$WS_POPUP, $WS_EX_MDICHILD, $Gui) $button = GUICtrlCreateButton("Button",0,0,75,23) $ParentPosArr = WinGetPos($Gui) WinMove($ChildGui, "", $ParentPosArr[0]+$ParentPosArr[2], $ParentPosArr[1]+5) WinSetTrans($ChildGui, '', 250) GUISetState(@SW_SHOW, $Gui) GUISetState(@SW_SHOW, $ChildGui) GUIRegisterMsg(0x231, "On_WM_ENTERSIZEMOVE") GUIRegisterMsg(0x232, "On_WM_EXITSIZEMOVE") While 1 $Msg = GUIGetMsg(1) Select Case $Msg[1] = $Gui And $Msg[0] = -3 Exit EndSelect WEnd Func On_WM_ENTERSIZEMOVE() ;~ WinSetTrans($ChildGui, '', 100) GUICtrlSetData($button,"Moving") EndFunc Func On_WM_EXITSIZEMOVE() ;~ WinSetTrans($ChildGui, '', 200) GUICtrlSetData($button,"Button") EndFunc [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
Madza91 Posted August 4, 2008 Share Posted August 4, 2008 My solution: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Test", 633, 441, -1, -1) $button1 = GUICtrlCreateButton("Child_1", 100, 300, 100, 30) $button2 = GUICtrlCreateButton("Child_2", 400, 50, 100, 20) $ChildGui = GuiCreate("Child test", 100, 300, -1, -1,$WS_POPUP, $WS_EX_MDICHILD, $Gui) $label1 = GUICtrlCreateLabel("Test Label1", 5, 5, 90) GUICtrlSetBkColor(-1, 0xFFFFFF) $label2 = GUICtrlCreateLabel("Test Label2", 5, 270, 90) GUICtrlSetBkColor(-1, 0xFFFFFF) $ParentPosArr = WinGetPos($Gui) WinMove($ChildGui, "", $ParentPosArr[0]+$ParentPosArr[2], $ParentPosArr[1]+5) WinSetTrans($ChildGui, '', 250) GUISetBkColor ( 0xFF0000) GUISetState(@SW_SHOW, $Gui) GUISetState(@SW_HIDE, $ChildGui) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $button1 _show_child_window($button1) Case $button2 _show_child_window($button2) EndSwitch WEnd Func _show_child_window($button_handle) $position = ControlGetPos($Gui, "", $button_handle) $position2 = WinGetPos($Gui, "") WinMove($ChildGui, "", $position2[0]+$position[0]+3, $position2[1]+$position[1]+$position[3]+28) GUISetState(@SW_SHOW, $ChildGui) EndFunc [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) 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