Yashied Posted May 10, 2009 Share Posted May 10, 2009 With the rover`s example, I wrote a function _GUICreateDlgFrame(). But there is one small problem. The program is listed, when you press ALT-TAB. How do I remove it from there?Thanks.expandcollapse popup#Include <WinAPI.au3> #Include <WindowsConstants.au3> global const $GCL_HICON = -14 global const $GCL_HICONSM = -34 _GUICreateDlgFrame('Test', 380, 160, -1, -1, 0, 0, GUICreate('Test_Parent')) GUISetState() do until GUIGetMsg() = -3 func _GUICreateDlgFrame($sTitle, $iWidth = -1, $iHeight = -1, $iLeft = -1, $iTop = -1, $iStyle = 0, $iExStyle = 0, $hParent = 0) local $hWnd = GUICreate($sTitle, $iWidth, $iHeight, $iLeft, $iTop, BitOR($WS_CAPTION, $WS_SYSMENU, $iStyle), BitOR($WS_EX_DLGMODALFRAME, $iExStyle), $hParent) if (@error) or ($hWnd = 0) then return SetError(1, 0, 0) endif _WinAPI_DestroyIcon(_WinAPI_GetClassLong($hWnd, $GCL_HICON)) _WinAPI_SetClassLong($hWnd, $GCL_HICON, 0) _WinAPI_SetClassLong($hWnd, $GCL_HICONSM, 0) return SetError(0, 0, $hWnd) endfunc; _GUICreateDlgFrame func _WinAPI_GetClassLong($hWnd, $nIndex) local $ret = DllCall('user32.dll', 'int', 'GetClassLong', 'hwnd', $hWnd, 'int', $nIndex) if (@error) or ($ret[0] = 0) then return 0 endif return $ret[0] endfunc; _WinAPI_GetClassLong func _WinAPI_SetClassLong($hWnd, $nIndex, $dwNewLong) local $ret = DllCall('user32.dll', 'int', 'SetClassLong', 'hwnd', $hWnd, 'int', $nIndex, 'long', $dwNewLong) if (@error) or ($ret[0] = 0) then return 0 endif return $ret[0] endfunc; _WinAPI_SetClassLong My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Authenticity Posted May 10, 2009 Share Posted May 10, 2009 With $WS_EX_TOOLWINDOW: expandcollapse popup#Include <WinAPI.au3> #Include <WindowsConstants.au3> global const $GCL_HICON = -14 global const $GCL_HICONSM = -34 _GUICreateDlgFrame('Test', 380, 160, -1, -1, 0, $WS_EX_TOOLWINDOW, GUICreate('Test_Parent')) GUISetState() do until GUIGetMsg() = -3 func _GUICreateDlgFrame($sTitle, $iWidth = -1, $iHeight = -1, $iLeft = -1, $iTop = -1, $iStyle = 0, $iExStyle = 0, $hParent = 0) local $hWnd = GUICreate($sTitle, $iWidth, $iHeight, $iLeft, $iTop, BitOR($WS_CAPTION, $WS_SYSMENU, $iStyle), BitOR($WS_EX_DLGMODALFRAME, $iExStyle), $hParent) if (@error) or ($hWnd = 0) then return SetError(1, 0, 0) endif _WinAPI_DestroyIcon(_WinAPI_GetClassLong($hWnd, $GCL_HICON)) _WinAPI_SetClassLong($hWnd, $GCL_HICON, 0) _WinAPI_SetClassLong($hWnd, $GCL_HICONSM, 0) return SetError(0, 0, $hWnd) endfunc; _GUICreateDlgFrame func _WinAPI_GetClassLong($hWnd, $nIndex) local $ret = DllCall('user32.dll', 'int', 'GetClassLong', 'hwnd', $hWnd, 'int', $nIndex) if (@error) or ($ret[0] = 0) then return 0 endif return $ret[0] endfunc; _WinAPI_GetClassLong func _WinAPI_SetClassLong($hWnd, $nIndex, $dwNewLong) local $ret = DllCall('user32.dll', 'int', 'SetClassLong', 'hwnd', $hWnd, 'int', $nIndex, 'long', $dwNewLong) if (@error) or ($ret[0] = 0) then return 0 endif return $ret[0] endfunc; _WinAPI_SetClassLong Link to comment Share on other sites More sharing options...
Yashied Posted May 10, 2009 Author Share Posted May 10, 2009 With $WS_EX_TOOLWINDOW:Thank, but it would be too easy. $WS_EX_TOOLWINDOW is not suitable for this purpose. I need to keep the current window title.Any ideas. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
ProgAndy Posted May 10, 2009 Share Posted May 10, 2009 This works for me $hiddenGUI = GUICreate('Test_Parent',0,0,0,0,0,$WS_EX_TOOLWINDOW) _GUICreateDlgFrame('Test', 380, 160, -1, -1, 0, 0, $hiddenGUI ) and no other changes to your code. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Mat Posted May 10, 2009 Share Posted May 10, 2009 I ran your code and it didn't appear... I am using a replacement alt tab, but that shouldn't affect it... AutoIt Project Listing Link to comment Share on other sites More sharing options...
Authenticity Posted May 10, 2009 Share Posted May 10, 2009 Call GUISetState() or you mean it's actually succeeded in not appearing on the task-switch window? Link to comment Share on other sites More sharing options...
Mat Posted May 10, 2009 Share Posted May 10, 2009 I checked it out to test and see if i could help... and nothing came up!! I closed the replacement, and it now appears... and i am confused... I have looked into it, and I haven't set any exceptions that would apply to that window... but even if i disable them all, same result. don't worry, its not your problem, neither does it doesn't answer yours. MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Yashied Posted May 10, 2009 Author Share Posted May 10, 2009 This works for me $hiddenGUI = GUICreate('Test_Parent',0,0,0,0,0,$WS_EX_TOOLWINDOW) _GUICreateDlgFrame('Test', 380, 160, -1, -1, 0, 0, $hiddenGUI ) and no other changes to your code.Ahh..., it really works. x8 thanks to you, ProgAndy. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... 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