Sign in to follow this  
Followers 0
jerem488

Hide program in taskbar

9 posts in this topic

Hello,

I want to launch my program (not an autoit program), maximised, and I want he doesn't appear in the taskbar.

I have see the $WS_EX_TOOLWINDOW option, but it's for guicreate command.

How to do this ??

Thanks in advnace


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Hello,

I want to launch my program (not an autoit program), maximised, and I want he doesn't appear in the taskbar.

I have see the $WS_EX_TOOLWINDOW option, but it's for guicreate command.

How to do this ??

Thanks in advnace

The desktop is just another window (i.e. "[CLASS:Progman; TITLE:Program Manager]"). The taskbar is just a toolbar control on that window (i.e. "[CLASS:ToolbarWindow32; INSTANCE:3]"). The applications on the taskbar are just buttons on that toolbar control (i.e. use _GUICtrlToolbar_ButtonCount()). You can get references to those buttons and change their Hide/Visible state with regular AutoIt UDFs (i.e. _GUICtrlToolbar_SetButtonState()).

Demos for this have been posted before. Note there is an additional step of getting the CommandID of the button on the toolbar with _GUICtrlToolbar_IndexToCommand().

:)

Edit: Added details.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Yes thank you but I haven't find the solution in forum. I'm sure the solution was already post...

Thank you


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites

Yes thank you but I haven't find the solution in forum. I'm sure the solution was already post...

Thank you

Try this. It was for a system tray icon, but the same principle applies. The system tray and the task bar are just two different toolbar controls.

Note the instance numbers of the control can change. On this system for example, the system tray is ToolbarWindow32 instance 1, the Windows Search control is instance 2, and the task bar is instance 3.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I have see the $WS_EX_TOOLWINDOW option, but it's for guicreate command

It's a (ex)style, you can set it also for other windows:

#include <Constants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
;

$hWin = WinGetHandle("My App")
_WinSetStyle($hWin, -1, $WS_EX_TOOLWINDOW)

Func _WinSetStyle($hWnd, $nStyle = -1, $nExStyle = 0)
    If Not IsHWnd($hWnd) And Not WinExists(HWnd($hWnd)) Then Return SetError(1, 0, 0)
    
    Local $iWinState = WinGetState($hWnd)
    Local $iFlags = BitOR($SWP_SHOWWINDOW, $SWP_NOSIZE, $SWP_NOMOVE, $SWP_NOZORDER)
    
    If $nStyle = -1 Then $nStyle = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)
    
    If BitAND($nExStyle, $WS_EX_TOOLWINDOW) And BitAND($iWinState, 2) Then WinSetState($hWnd, "", @SW_HIDE)
    
    _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, $nStyle)
    _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $nExStyle)
    
    _WinAPI_SetWindowPos($hWnd, 0, 0, 0, 0, 0, $iFlags)
    
    If BitAND($nExStyle, $WS_EX_TOOLWINDOW) And BitAND($iWinState, 2) Then WinSetState($hWnd, "", @SW_SHOW)
EndFunc
Edited by MrCreatoR

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

Hello,

Thanks a lot MrCreator ! !

It's this ! But in your code, I have search what parameter hide border ??

Otherwise all is ok !

thank you


Qui ose gagneWho Dares Win[left]CyberExploit[/left]

Share this post


Link to post
Share on other sites

what parameter hide border ?

Only if you will set $WS_POPUP style (but you loose the titlebar).

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites

@jerem488

I found a good script for hiding taskbar items. I know it works in Vista x64.

Hide Taskbar Button

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0