473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Why does ShowInTaskbar = false close my form when Child Form is closed?

15
I have MainForm with 20+ buttons, every button on click opens new form for Data Input.

I'm trying to achieve to have only one Taskbar Icon like this:

Expand|Select|Wrap|Line Numbers
  1. private void button27_Click(object sender, EventArgs e)
  2.         {
  3.             this.ShowInTaskbar = false;
  4.             Rez RZ = new Rez();
  5.             RZ.Owner = this;
  6.             RZ.ShowDialog();
  7.         }
And it's working great, but when I close my Child Form(RZ^^) mine MainForm is closed to and I'm back to login Form, when I log back in and repeat(Open new child form, close it) whole application is closed.

If I leave
Expand|Select|Wrap|Line Numbers
  1. ShowInTaskbar = true;
I can open/close mine child forms as much as I want and MainForm won't Close, why does it close if I just don't want it to be shown in Taskbar???

I'm using Visual C# Express 2010 and in it's designer I've left default values for ShowInTaskbar(true).

I've tried to add

Expand|Select|Wrap|Line Numbers
  1. this.ShowInTaskbar = true;
after
Expand|Select|Wrap|Line Numbers
  1. x.ShowDialog();
But it isn't triggered cause MainForm gets closed before it does.

I would like to have Focused/Current Form ShowInTaskbar and all others not to be shown.
Jul 17 '12 #1
0 1582

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Daniel | last post by:
is there any way to clear the buffer of a System.IO.StreamWriter so that it does not do a flush when it is closed in the finaly block?
5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
3
by: Omar Llanos | last post by:
I have Form1 and Form2 (which is inherited from Form1), and I created a button in Form2 that will fill up a textbox in Form1. What code would do that? I tried the simplest way: //from child...
2
by: Paul | last post by:
Hi this is related to a previous post, hopefully just a bit clearer description o the problem. I have a parent form that opens a new form (child form) while still leaving the parent form open....
6
by: Tom | last post by:
Is there ANY easy way to close a MDI Child form in the middle of it's load? For instance, during the Load event I find a need to close the form (for whatever reason - maybe the user isn't ready for...
0
by: Ben | last post by:
Please excuse if this ends up being a double post at some point. I tried posting using another website which crashed, so I am not sure if it will ever get posted. As such I decided to try again...
3
by: jimcolli | last post by:
I have a parent form with a menu button that has a handler. I want to call this same handler when a button on a child form is clicked. I have this simplified code in the main form's Load...
2
by: dchman | last post by:
I have a C# app in VS2005. the form has a datetime picker with valuechanged event. When the form closes, the valuechanged event is fired and an error is thrown in its code when it tries to get a...
1
by: ramkarthik99 | last post by:
am really confused in designing a MDI parent form and Child form. help me out
2
by: =?Utf-8?B?U2FpbXZw?= | last post by:
Hi and Hello. Im new at .net framework. Now Im using C# . I have a little problem. How can I get a value of a text in the mdi parent form to child form. Example in VB6: form1.text1.text =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.