sandin Posted October 30, 2008 Share Posted October 30, 2008 this is my script: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Form1", 350, 450) $Button1 = GUICtrlCreateButton("Button1", 20, 30, 150, 40) GUISetState(@SW_SHOW, $Gui) $ChildGui = GuiCreate("pop up", 200, 300, 100, 80, -1, $WS_EX_MDICHILD, $Gui) $button2 = GUICtrlCreateButton("close", 20, 150, 60, 40) GUISetBkColor ( 0xFF0000) GUISetState(@SW_HIDE, $ChildGui) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $ChildGui, "int", 1000, "long", 0x00040004) GUISetState(@SW_SHOW, $ChildGui) case $button2 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $ChildGui, "int", 1000, "long", 0x00050008) GUISetState(@SW_HIDE, $ChildGui) EndSwitch WEnd when u pop up a child window, and click "close" button in it, it'll lave it's lines. Why is that? can it be avoided? 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...
FaT3oYCG Posted October 30, 2008 Share Posted October 30, 2008 i dont understand your problem i run the script here are some screenshots of what i seeclick the buttonclose the childafter the child has closedi used the same code as you please explain in more detail what you want help with Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right. Link to comment Share on other sites More sharing options...
Zedna Posted October 30, 2008 Share Posted October 30, 2008 Look here to get idea about possiible solution :-)http://www.autoitscript.com/forum/index.ph...st&p=354277 Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
ResNullius Posted October 30, 2008 Share Posted October 30, 2008 when u pop up a child window, and click "close" button in it, it'll lave it's lines. Why is that? can it be avoided?Try adding $WS_EX_LAYERED style to your parent GUI. And it might not hurt to throw in $WS_CLIPCHILDREN too. $Gui = GUICreate("Form1", 350, 450,-1,-1,$WS_CLIPCHILDREN,$WS_EX_LAYERED) Link to comment Share on other sites More sharing options...
sandin Posted October 30, 2008 Author Share Posted October 30, 2008 i dont understand your problem i run the script here are some screenshots of what i see i used the same code as you please explain in more detail what you want help with there's a visual bug while child window is going up like this: it leaves it's trace as it's going up and I want to get rid of it Look here to get idea about possiible solution :-) http://www.autoitscript.com/forum/index.ph...st&p=354277 Ty for the link, so it seems that the pop up/down function should not be related to the "while" part, or.. I'm missing something? =( sry, but I'm not so much of an advanced autoit user, I still find that script confusing. =) Try adding $WS_EX_LAYERED style to your parent GUI. And it might not hurt to throw in $WS_CLIPCHILDREN too. $Gui = GUICreate("Form1", 350, 450,-1,-1,$WS_CLIPCHILDREN,$WS_EX_LAYERED) I tried, it's still the same. =( 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...
FaT3oYCG Posted October 30, 2008 Share Posted October 30, 2008 fair enuf i dont know why it does that take a look at the styles in the autoit help file or code the closing yourself e.g. make the height less and less every while loop and when it eventually gets small enuf kill the window or delete it with the gui delete function. Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right. Link to comment Share on other sites More sharing options...
sandin Posted October 30, 2008 Author Share Posted October 30, 2008 fair enuf i dont know why it does that take a look at the styles in the autoit help file or code the closing yourself e.g. make the height less and less every while loop and when it eventually gets small enuf kill the window or delete it with the gui delete function.I already made that with winmove(), and locking child's controls locked by bottom line of the window, but I disliked it, cuz sliding is not smooth like using "user32.dll" animate window function. 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 October 31, 2008 Author Share Posted October 31, 2008 problem solved #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Gui = GUICreate("Form1", 350, 450) $Button1 = GUICtrlCreateButton("Button1", 20, 30, 150, 40) GUISetState(@SW_SHOW, $Gui) $ChildGui = GuiCreate("pop up", 200, 300, 100, 80, -1, $WS_EX_MDICHILD, $Gui) $button2 = GUICtrlCreateButton("close", 20, 150, 60, 40) GUISetBkColor ( 0xFF0000) GUISetState(@SW_HIDE, $ChildGui) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $ChildGui, "int", 1000, "long", 0x00040004) GUISetState(@SW_SHOW, $ChildGui) case $button2 WinSetTrans($Gui, "", 254) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $ChildGui, "int", 1000, "long", 0x00050008) GUISetState(@SW_HIDE, $ChildGui) WinSetTrans($Gui, "", 255) EndSwitch WEnd 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...
elpresident3 Posted October 31, 2008 Share Posted October 31, 2008 Sorry to break this to you but try moving the parent window. The problem reappears. 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