What would cause VS2005 Pro to lose all of my MdiForm Design information?
I've been working on one of the Child Forms and having problems with the
Child Form's threads not completing (locking up and not responding anymore).
So, I shut down VS, turned off my PC, then turned everything back on.
Now, my MdiForm Design looks like a blank form whenever a new form is added
to a project. My Tray Icon, Status Bar strip, and Main Menu are all there,
but nothing is on the form.
What would cause Visual Studio to dump this? Is there a way that I can
salvage it? (probably not) 6 2263
"jp2msft" wrote:
What would cause VS2005 Pro to lose all of my MdiForm Design information?
I've been working on one of the Child Forms and having problems with the
Child Form's threads not completing (locking up and not responding anymore).
So, I shut down VS, turned off my PC, then turned everything back on.
Now, my MdiForm Design looks like a blank form whenever a new form is added
to a project. My Tray Icon, Status Bar strip, and Main Menu are all there,
but nothing is on the form.
What would cause Visual Studio to dump this? Is there a way that I can
salvage it? (probably not)
Hi,
What MdiForm design do you mean? As far as I know the VS designer wont
display child windows at design time, so how are you able to see them on the
MdiForm. Or do you mean UserControls? These can be dragged onto any form or
control and be displayed in the VS designer. However, an MdiForm also has a
MdiClient control added to it. If the MdiClient is somehow pushed topmost
(like MdiClient.BringToFront()) all other controls will appear to vanish as
they are put underneath.
If you are putting UserControls on your MdiParent and they vanish I'm
guessing the MdiClient is covering them. If so, try checking your code for a
MdiClient reference and make sure you aren't putting it in front of the
usercontrols.
--
Happy Coding!
Morten Wennevik [C# MVP]
"Morten Wennevik [C# MVP]" wrote:
>
"jp2msft" wrote:
What would cause VS2005 Pro to lose all of my MdiForm Design information?
I've been working on one of the Child Forms and having problems with the
Child Form's threads not completing (locking up and not responding anymore).
So, I shut down VS, turned off my PC, then turned everything back on.
Now, my MdiForm Design looks like a blank form whenever a new form is added
to a project. My Tray Icon, Status Bar strip, and Main Menu are all there,
but nothing is on the form.
What would cause Visual Studio to dump this? Is there a way that I can
salvage it? (probably not)
Hi,
What MdiForm design do you mean? As far as I know the VS designer wont
display child windows at design time, so how are you able to see them on the
MdiForm. Or do you mean UserControls? These can be dragged onto any form or
control and be displayed in the VS designer. However, an MdiForm also has a
MdiClient control added to it. If the MdiClient is somehow pushed topmost
(like MdiClient.BringToFront()) all other controls will appear to vanish as
they are put underneath.
If you are putting UserControls on your MdiParent and they vanish I'm
guessing the MdiClient is covering them. If so, try checking your code for a
MdiClient reference and make sure you aren't putting it in front of the
usercontrols.
--
Happy Coding!
Morten Wennevik [C# MVP]
Mr. Wennevik,
Actually, what has happened is that my MdiForm lost all of its settings. The
Main Menu, Status Bar, and Tray Icon controls still appear in Design Mode,
but the Main Form has lost all of its settings. The name is now "Form1"
(where it was my application's name), it is not set to be an MDI Form, there
is no Menu associated with the form (even though the Main Menu is still
located there), my application's icon is gone, ...everything has been reset!
You name it - it is no longer on my MDI form.
"jp2msft" wrote:
"Morten Wennevik [C# MVP]" wrote:
"jp2msft" wrote:
What would cause VS2005 Pro to lose all of my MdiForm Design information?
>
I've been working on one of the Child Forms and having problems with the
Child Form's threads not completing (locking up and not responding anymore).
>
So, I shut down VS, turned off my PC, then turned everything back on.
>
Now, my MdiForm Design looks like a blank form whenever a new form is added
to a project. My Tray Icon, Status Bar strip, and Main Menu are all there,
but nothing is on the form.
>
What would cause Visual Studio to dump this? Is there a way that I can
salvage it? (probably not)
Hi,
What MdiForm design do you mean? As far as I know the VS designer wont
display child windows at design time, so how are you able to see them on the
MdiForm. Or do you mean UserControls? These can be dragged onto any form or
control and be displayed in the VS designer. However, an MdiForm also has a
MdiClient control added to it. If the MdiClient is somehow pushed topmost
(like MdiClient.BringToFront()) all other controls will appear to vanish as
they are put underneath.
If you are putting UserControls on your MdiParent and they vanish I'm
guessing the MdiClient is covering them. If so, try checking your code for a
MdiClient reference and make sure you aren't putting it in front of the
usercontrols.
--
Happy Coding!
Morten Wennevik [C# MVP]
Mr. Wennevik,
Actually, what has happened is that my MdiForm lost all of its settings. The
Main Menu, Status Bar, and Tray Icon controls still appear in Design Mode,
but the Main Form has lost all of its settings. The name is now "Form1"
(where it was my application's name), it is not set to be an MDI Form, there
is no Menu associated with the form (even though the Main Menu is still
located there), my application's icon is gone, ...everything has been reset!
You name it - it is no longer on my MDI form.
Ah,
It sounds like Visual Studio in the chaos found the need to recreate the
form.designer.cs file and thereby managed to overwrite the original settings.
In that case, your old settings are probably gone unless you have some form
of source control. If you do have source control, replace the entire content
of <mdiform>.designer.cs with the older version. Also make sure you have a
call to InitializeComponent() in the constructor.
--
Happy Coding!
Morten Wennevik [C# MVP]
"Morten Wennevik [C# MVP]" wrote:
Ah,
It sounds like Visual Studio in the chaos found the need to recreate the
form.designer.cs file and thereby managed to overwrite the original settings.
In that case, your old settings are probably gone unless you have some form
of source control. If you do have source control, replace the entire content
of <mdiform>.designer.cs with the older version. Also make sure you have a
call to InitializeComponent() in the constructor.
I've got most of my fields added back onto the form by now. My problem now
is getting my Main Menu back!
Any idea how to do this?
I have specified that the Main Menu is the MdiForm's MainMenuStrip item, but
it does not actually appear on the form.
I don't suppose you would have any idea of how to do this?
I'd really rather not have to recreate my Main Menu, as I go through and
replace all of Visual Studio's very long names with something much simpler
(toolstripmenuitemFileOpen with miOpen), and that takes *hours* to do!
Ok, I found what I needed:
In the MdiForm's Designer.cs file, I added these items:
this.Controls.Add(this.MainMenu);
this.Controls.Add(this.StatusBar);
this.Controls.Add(this.TrayIcon);
However, the instructions say "do not modify the contents of this method
with the code editor."
Will my changes be lost? How do I ensure that these settings stay?
"jp2msft" wrote:
"Morten Wennevik [C# MVP]" wrote:
Ah,
It sounds like Visual Studio in the chaos found the need to recreate the
form.designer.cs file and thereby managed to overwrite the original settings.
In that case, your old settings are probably gone unless you have some form
of source control. If you do have source control, replace the entire content
of <mdiform>.designer.cs with the older version. Also make sure you have a
call to InitializeComponent() in the constructor.
I've got most of my fields added back onto the form by now. My problem now
is getting my Main Menu back!
Any idea how to do this?
I have specified that the Main Menu is the MdiForm's MainMenuStrip item, but
it does not actually appear on the form.
I don't suppose you would have any idea of how to do this?
I'd really rather not have to recreate my Main Menu, as I go through and
replace all of Visual Studio's very long names with something much simpler
(toolstripmenuitemFileOpen with miOpen), and that takes *hours* to do!
"jp2msft" wrote:
Ok, I found what I needed:
In the MdiForm's Designer.cs file, I added these items:
this.Controls.Add(this.MainMenu);
this.Controls.Add(this.StatusBar);
this.Controls.Add(this.TrayIcon);
However, the instructions say "do not modify the contents of this method
with the code editor."
Will my changes be lost? How do I ensure that these settings stay?
"jp2msft" wrote:
As long as you make sure you use the correct format when editing the
designer file you should be safe. The section is handled by Visual Studio
but editing it manually should update the designer as well. To add a control
to the designer section manually you need to add tre parts shown below.
After you add them go to the designer view and the control should pop up.
The safest way is to then cut away the control and paste it back. This will
let Visual Studio write the correct lines of code. Simpler things like
moving controls from one container to another, changing properties etc can be
done manually in the designer code just fine. You should, however, leave the
name property untouched in the designer file and change this in the designer
instead.
this.myControl = new MyControl();
....
///
/// myControl
///
this.myControl.Property1 = ...
....
....
private MyControl myControl;
--
Happy Coding!
Morten Wennevik [C# MVP] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: andreas |
last post by:
I have a program with a mdiform and same childforms (with a textbox) that i
open.
All works fine.
In the childform i open another form (for finding and replacing).
In a sub in that form i try to...
|
by: andreas |
last post by:
I have a program with a mdiform and same childforms (with a textbox) that i
open.
All works fine.
In the childform i open another form (for finding and replacing).
In a sub in that form i try to...
|
by: andreas |
last post by:
I have a program with a mdiform and same childforms (with a textbox) that i
open.
All works fine.
In the childform i open another form (for finding and replacing).
In a sub in that form i try to...
|
by: andreas |
last post by:
I have a program with a mdiform and same childforms (with a textbox) that i
open.
All works fine.
In the childform i open another form (for finding and replacing).
In a sub in that form i try to...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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,...
|
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...
| |
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |