473,395 Members | 1,473 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,395 software developers and data experts.

Hiding a main form without hiding a sub form

In a C# form named Form1, I created an instance of an existing form named Form2 and made it visible using the code:
Form2 myForm2 = new Form2();
myForm2.Show();
It works fine. But when I hide Form1 from Form1, using the code,
this.Hide();
Form2 disappears if it is open.
(The same thing happens, if I hide Form1 from Form2,using a different set of codes)
Why does Form2 disappears when Form1 is closed? Any help would be appreciated.
Jul 5 '14 #1
0 1191

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

Similar topics

6
by: Matthew Wells | last post by:
I am trying to load a form (load Me) without the form becoming visible. If I try me.hide or me.visible = false, they load the form and the form blinks before becoming invisible. Is there a way to...
1
by: Peter Rilling | last post by:
What events are fired when the Form.Show() and Form.Hide() methods are called. I know Load fires the first time, but what about showing and hiding the form at any point during its life cycle? ...
4
by: Daniel R. Rossnagel | last post by:
As I can hide the bar of I title of a window daughter maximized within form MDI Already I have proven with different types from borders, hiding thebuttons to maximize, to diminish and control box,...
5
by: akowald | last post by:
For some reason Form1.hide() won't hide the form. I run this command at form load. I need it to hide because I'm placing an icon on the system tray. Any ideals? I probley changed something that...
5
by: Wilfried Mestdagh | last post by:
Hi, I have an application with a main form, but I want to hide it as fast as possible. Seems the only way to not show a single flicker is setting Opacity = 0 in the constructor, and Visible =...
2
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
Based on wether a row is selected in a GridView I need to HIDE the last two columns of a gridview. I do NOT need to make the cells invisible I want to hide the entire column. When I set the...
3
by: SoNew | last post by:
To say I'm new is an understatement - but somehow my boss decided I was the one to create a database in Access 2003...I'm nearly there. I have a small problem in that I have locked the main form...
0
Plater
by: Plater | last post by:
I have been trying to access a messageloop without opening a form. That is, I want to be able to receive messages from other applications through the message loop without having a form. I've read...
2
by: muddasirmunir | last post by:
Well, while the form was load i hide the form by form1.hide but teh problem is if i hide the form , the activate event of form does not run/trigger. Is this possible to activate the form...
0
NeoPa
by: NeoPa | last post by:
Introduction : This article relates to the long-standing (Since at least Access 2.0.) problem whereby a Form, used within a Subform of another (main) Form, will have any temporary and transient...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
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...

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.