473,498 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

icon hide from taskbar and alt+tab key

I can hide the icon with this.ShowInTaskbar = false;
but I still can see the icon when press alt+tab, is there any way I can
hide the icon when press alt+tab?
Nov 17 '05 #1
2 6984
Hi,

P/Invoke is the answer :)

// Api functions
[DllImport("user32.dll",EntryPoint="SetForegroundWi ndow")]
public static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern int SetWindowLong( IntPtr window, int index, int
value);
[DllImport("user32.dll")]
public static extern int GetWindowLong( IntPtr window, int index);

const int GWL_EXSTYLE = -20;
const int WS_EX_TOOLWINDOW = 0x00000080;
const int WS_EX_APPWINDOW = 0x00040000;

int windowStyle = GetWindowLong(Handle, GWL_EXSTYLE);
SetWindowLong(Handle, GWL_EXSTYLE, windowStyle | WS_EX_TOOLWINDOW);
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Steve" <St***@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
I can hide the icon with this.ShowInTaskbar = false;
but I still can see the icon when press alt+tab, is there any way I can
hide the icon when press alt+tab?

Nov 17 '05 #2
Ignacio,

It works, thanks a lot

"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

P/Invoke is the answer :)

// Api functions
[DllImport("user32.dll",EntryPoint="SetForegroundWi ndow")]
public static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern int SetWindowLong( IntPtr window, int index, int
value);
[DllImport("user32.dll")]
public static extern int GetWindowLong( IntPtr window, int index);

const int GWL_EXSTYLE = -20;
const int WS_EX_TOOLWINDOW = 0x00000080;
const int WS_EX_APPWINDOW = 0x00040000;

int windowStyle = GetWindowLong(Handle, GWL_EXSTYLE);
SetWindowLong(Handle, GWL_EXSTYLE, windowStyle | WS_EX_TOOLWINDOW);
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Steve" <St***@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
I can hide the icon with this.ShowInTaskbar = false;
but I still can see the icon when press alt+tab, is there any way I can
hide the icon when press alt+tab?


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2610
by: ODB | last post by:
Hi I have a small application with a notifying icon, in the task bar, i have removed the normal icon from the taskbar, but now i need to remove the Alt- Tab menu icon, can you tell me what...
3
6704
by: meska | last post by:
Is there a way in c# to hide program , that it would show in alt+tab ?
4
6271
by: Adam J. Schaff | last post by:
How can I issue an Alt+Tab command from within VB.NET code? Specifically, I am trying to swap to the next application in the Alt+Tab order in a way that is reversible with a single Alt+Tab to get...
4
13163
by: Never Best | last post by:
I have an application. I want it so when the user minimizs the window it goes into the system tray, and while in the system tray I don't want it in the "Alt-Tab" list. (When the program starts it...
0
1334
by: KrippZ | last post by:
Hello ! Need help on changing a icon in the alt tab list. When I click the notify icon in system tray the alt tab list Icon is the standard form icon, I ´d like to change it but how?
3
3170
by: gusma728 | last post by:
Is there an easy way to remove the icon of a form (in this case a progress bar) from the alt-tab menu? When the progress bar appears in my appIication the default program icon appears in the alt+tab...
0
1353
by: Alexander Vasilevsky | last post by:
How to prevent the emergence of applications icons in the window, the operating system's displayed when you press Alt + Tab combination? http://www.alvas.net - Audio tools for C# and VB.Net...
1
2112
by: michael | last post by:
i has a main form named 'Form1', the main form show a other form named 'Form2', then the taskbar has two item i set the Form2's Property 'ShowInTaskbar' to 'False', then the taskbar only has...
4
2161
by: CyberSoftHari | last post by:
I did below and it is not showing in task bar but when I press Alt + Tab then it is showing in that list. How to disable there. ShowInTaskbar = false;
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.