473,804 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ShowInTaskbar problems at run time

Ive an application that usually runs in the taskbar. ShowInTaskbar is set to
false during InitializeCompo nent.
It works fine.
However, I decided that i'd like the application to show in the task bar
when it was open on the desktop so set ShowInTaskbar to true when the form
was unhidden.
Unfortunately the application fell over with an "unable to get window
handle" error.
Am I able to set this property after initialization?

thanks
Claire

Nov 16 '05 #1
2 7210
Perhaps you could post some example code showing this problem...

Regards
Lee Alexander

"Claire" <bl****@blahhhh h.com> wrote in message
news:uS******** ********@TK2MSF TNGP11.phx.gbl. ..
Ive an application that usually runs in the taskbar. ShowInTaskbar is set to false during InitializeCompo nent.
It works fine.
However, I decided that i'd like the application to show in the task bar
when it was open on the desktop so set ShowInTaskbar to true when the form
was unhidden.
Unfortunately the application fell over with an "unable to get window
handle" error.
Am I able to set this property after initialization?

thanks
Claire

Nov 16 '05 #2
Hi Clair,

What I have done and it seems to work so far is put the following code in
the constructor of the form. I think I went down the path trying to hide
the form too but ran into problems.

this.ShowInTask bar = false;
this.WindowStat e = FormWindowState .Minimized;

When I want to reshow the form I basicaly do the opposite.

this.WindowStat e = FormWindowState .Normal;
this.ShowInTask bar = true;

Hope this helps
Paul

"Claire" <bl****@blahhhh h.com> wrote in message
news:uS******** ********@TK2MSF TNGP11.phx.gbl. ..
Ive an application that usually runs in the taskbar. ShowInTaskbar is set
to false during InitializeCompo nent.
It works fine.
However, I decided that i'd like the application to show in the task bar
when it was open on the desktop so set ShowInTaskbar to true when the form
was unhidden.
Unfortunately the application fell over with an "unable to get window
handle" error.
Am I able to set this property after initialization?

thanks
Claire

Nov 16 '05 #3

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

Similar topics

0
1323
by: ptass | last post by:
I have a main form (Form1) which opens a second form (Form2) when a button is clicked. Form2 has .FormBorderStyle set to FixedSingle. Form2 contains two buttons, one which unpins it from Form1 by setting ..ShowInTaskBar to true, and setting .Owner to false. The other buttons click event reverses, this by setting .Owner to the form1 instance, and .ShowIntTaskBar to false. This all works fine, with Form2appearing in the taskbar and...
2
1831
by: WoodBeeProgrammer | last post by:
i have a bunch of icons located to the right of my ShowInTaskbar windows and to the left of my status tray icons. they do stuff like microphone, speech tools, ime etc. how do they get there? do i use the "RightJustifyInTaskbar" property? TIA!
0
2062
by: Bobby D | last post by:
I have two applications, one is sending a message, one is receiving. The sending app's code is as follows: ------------------------------------------------------------------------ private void Main() { Process p = Process.GetProcessesByName("MyApp"); SendMessage(p.MainWindowHandle, 0xA123, IntPtr.Zero, IntPtr.Zero); }
0
1935
by: Machi | last post by:
I am using C#.NET. API version showintaskbar form Window taskbar hide show not fire events MouseLeave and MouseEnter! Now i am facing a critical problem for MouseLeave and MouseEnter event when i activate window taskbar hide show. I do a testing that a form have 2 button and 1 label text. 1 button is showintaskbar=true, another is showintaskbar=false, label text is for MouseLeave and MouseEnter event to change color. I noted that the...
2
1877
by: Darren | last post by:
After several postings and a lot of messing around I have found that when changing the ShowInTaskbar option of the form the player starts to resize itself when a file is played. It also crashes the program if the user clicks the full screen option when a video file is playing (it doesn't happen when playing music), this happens on several PCs and serveral applications including new projects. Has anyone else come accross this and is...
3
1508
by: Mitchell Vincent | last post by:
I can't find the post now but several months back I posted a problem I was having using the WebBrowser control when trying to have a systray icon pop back up a window that hadn't been shown in the taskbar. I was doing ShowInTaskbar = False - and someone here told me that wouldn't work because the browser control was ActiveX still and that ShowIOnTaskbar = false actually destroyed the window. So, I tried 2.0 Beta and the same thing happens...
0
1810
by: yasker | last post by:
I register a hotkey following this article: http://www.dotnet2themax.com/ShowContent.aspx?ID=103cca7a-0323-47eb-b210-c2bb7075ba78 Using windows api to archive it. But when I use it as a part of my program(it would minimize to tray before you call it), I found it doesn't work. Finally I found the statement which cause it: this.ShowInTaskbar = false; Though I wrote "ShowInTaskbar = true" later in the program, but hotkey didn't work...
4
2797
by: Mike | last post by:
I have a winforms application that is hidden using the following code upon prompt: //Remove from the taskbar and also from alt+tab this.Visible = false; this.ShowInTaskbar = false; this.WindowState = System.Windows.Forms.FormWindowState.Minimized; Upon correct DDE prompt from another application my application should show itself in normal state with an icon in the taskbar.
1
1702
by: afavretto | last post by:
Why if my WindowsForm has ShowInTaskbar to "False", the process isn't able to receive wMsg of type 0x4A from other processes ??? If ShowInTaskbar is true, my process can send and receive WMessages toward other applications! But if ShowInTaskbar is false, the process can only send WM!! The final question is following: Is there a way to send and receive messages without having the application on taskbar ?? Excluse for my not perfect...
0
9714
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5531
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.