AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hide Taskbar Button for DllCall

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dandersahn



Joined: 06 Oct 2008
Posts: 13

PostPosted: Thu Oct 16, 2008 3:40 am    Post subject: Hide Taskbar Button for DllCall Reply with quote

Is there any way to hide the taskbar button when making a DllCall that produces a dialog? I'm using the following code.

Code:
#NoTrayIcon
#NoEnv
#SingleInstance force

SHERB_NOCONFIRMATION := 1
SHERB_NOPROGRESSUI   := 2
SHERB_NOSOUND        := 4
Flag := 0  ; Combine any of the above values

DllCall("Shell32\SHEmptyRecycleBinA", UInt,0, UInt,0, UInt, Flag)


When the confirmation dialog is displayed, a taskbar button is displayed. I want to mimic the standard Windows empty recycle bin behavior which does not show the taskbar button.

Thanks.
Back to top
View user's profile Send private message
Serenity



Joined: 07 Nov 2004
Posts: 1271

PostPosted: Thu Oct 16, 2008 10:55 pm    Post subject: Reply with quote

Code:
#NoTrayIcon
#NoEnv
#SingleInstance Force

Gui, +LastFound
hwnd := WinExist()

SHERB_NOCONFIRMATION := 1
SHERB_NOPROGRESSUI   := 2
SHERB_NOSOUND        := 4
Flag := 0  ; Combine any of the above values

DllCall("Shell32\SHEmptyRecycleBinA", UInt,hwnd, UInt,0, UInt,Flag)

_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
dandersahn



Joined: 06 Oct 2008
Posts: 13

PostPosted: Fri Oct 17, 2008 3:20 am    Post subject: Reply with quote

Works perfectly. Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group