Jump to content

Hiding a window from the taskbar whit button


Recommended Posts

Hello all,

I'm making a GUI whit a hidden help GUI.

In the futher i'm making more GUI's from one father GUI.....

Is it possible to make a child GUI or a father GUI disapere from the taskbar but not from the notification area?

This because i'm making a script whit a nice little icon in the notification area :)

(this is a script i'm making whit what i've learned here in the forum from many poeple :unsure: (THNX 4 that :) ))

I'treid to put the $WS_EX_TOOLWINDOW into this script

but now the problem,... how can i change the focus to which window?

1 button for hide the child

1 for the father

1 for both ????

( :> for learning reasons here a sub question : is it possible to put something like this : ;)

:D GUICreate("Test", 615, 438, -1, -1, $dont_show_in_taskbar) ;)

or isn't that possible and shout i look for another way?

I realy whish this because it's clutering mine taskbar whit a lot of windows in this way:D

what i have at this point is

;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <Animate.au3>

;$GUI = GUICreate("Test", 615, 438, -1, -1)
$GUI = GUICreate("Test", 615, 438, -1, -1);, BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX,$WS_THICKFRAME))
$Button1 = GUICtrlCreateButton("Hide father GUI", 3, 3, 184, 37, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Hide child GUI", 3, 42, 184, 37, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Hide father and child GUI", 3, 81, 184, 37, $WS_GROUP)
$ContextMenu = GuiCtrlCreateContextMenu()
$SubMenu = GuiCtrlCreateMenu("SubMenu", $ContextMenu)
$SubMenuItem = GuiCtrlCreateMenuItem("SubMenu Help", $SubMenu)
$HelpItem = GuiCtrlCreateMenuItem("Help", $ContextMenu)
$defStyle=GUIGetStyle()
GUISetState(@SW_SHOW)
Opt('MustDeclareVars', 1)



Global $GuiMsg
Global $Show = False
Global $HelpGUI = GUICreate("Help Gui", 500, 200)
HotKeySet("^z", "ShowHelpGUI")

_Animate_LoadFromFile(@ScriptDir & '\Images\flag.png')
_Animate_SetDelay(80)
_Animate_ShowIcon()
_Animate_Start()

While 1
    $GuiMsg = GuiGetMsg()
    Select
    Case $GuiMsg = $HelpItem
        ShowHelpGUI()
    Case $GuiMsg = $SubMenuItem
        MsgBox(0, "test", "You pressed the 'Help' item in the sub context menu")
    Case $GuiMsg = $Gui_Event_Close
        Exit
    Case $GuiMsg=$Button1
        GUISetState(@SW_HIDE)
        GUISetStyle(-1,$defStyle[1])
        GUISetState(@SW_SHOW)
    Case $GuiMsg=$Button2
        GUISetState(@SW_HIDE)
        GUISetStyle(-1,$WS_EX_TOOLWINDOW)
        GUISetState(@SW_SHOW)
    Case $GuiMsg=$Button3
        GUISetState(@SW_HIDE)
        GUISetStyle(-1,$WS_EX_TOOLWINDOW)
        GUISetState(@SW_SHOW)
    EndSelect
WEnd

Func ShowHelpGUI()
    $Show = Not $Show
    GUISetState($Show, $HelpGui)
EndFunc

THNX in advanced

Edited by FMS

as finishing touch god created the dutch

Link to comment
Share on other sites

Is it possible to make a child GUI or a father GUI disappear from the taskbar but not from the notification area?

A bare bones Example as I posted in the previous thread >>

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $hGUI_1, $iButton_1, $iButton_2, $hGUI_2
$hGUI_1 = GUICreate("Parent GUI", 200, 200, -1, -1, -1, -1, WinGetHandle(AutoItWinGetTitle()))
$iButton_1 = GUICtrlCreateButton("Show Child GUI", 3, 3, 190, 37)
$iButton_2 = GUICtrlCreateButton("Hide Child GUI", 3, 42, 190, 37)
GUISetState(@SW_SHOW, $hGUI_1)

$hGUI_2 = GUICreate("Child GUI", 200, 100, -1, -1, -1, -1, $hGUI_1)
GUISetState(@SW_HIDE, $hGUI_2)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit

        Case $iButton_1
            GUISetState(@SW_SHOW, $hGUI_2)

        Case $iButton_2
            GUISetState(@SW_HIDE, $hGUI_2)

    EndSwitch
WEnd

Also have a look at _WinAPI_SetParent() to change the Child to a Parent GUI.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 2 weeks later...

but now the problem,... how can i change the focus to which window?

I used ControlFocus yesterday for one of my own scripts.

Check the help file for more info.

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

but now the problem,... how can i change the focus to which window?

WinActivate()

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...