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

Viewing forms in design view error

LDD
I have VB.Net project that I'm working on.

This morning, when I loaded the project, and clicked on the main form for
the project to view in designer mode. I get the following error

Property accessor 'IsMdiContainer' on object
'System.Windows.Forms.Design.FormDocumentDesigner' threw the following
exception:'Specified cast is not valid.'
I've googled it. There is a sugestion to set the Copy Local property for the
System.Windows.Forms reference to false. and restart the project

When I do that, the controls on my form are no longer as they were. My form
is smaller. the menubar is gone. and my grid has shrunk, because the form
has shrunk. when I resize the form the grid resizes, but I don't know what
happen to the menu bar.

Any ideas why this is happeneing?
And maybe a solution?

LDD
Nov 21 '05 #1
1 1536
LDD wrote:
I have VB.Net project that I'm working on.

This morning, when I loaded the project, and clicked on the main form for
the project to view in designer mode. I get the following error

Property accessor 'IsMdiContainer' on object
'System.Windows.Forms.Design.FormDocumentDesigner' threw the following
exception:'Specified cast is not valid.'
I've googled it. There is a sugestion to set the Copy Local property for the
System.Windows.Forms reference to false. and restart the project

When I do that, the controls on my form are no longer as they were. My form
is smaller. the menubar is gone. and my grid has shrunk, because the form
has shrunk. when I resize the form the grid resizes, but I don't know what
happen to the menu bar.

Any ideas why this is happeneing?
And maybe a solution?

LDD


Do you inherit from a sub form in this project? Do you do anything in
OnPaint override? Do you do some code in the Sub New()?

If yes to any of those the problem is probably in there. The designer
fires these events to display the form in the designer. You can stop
this from happening by wrapping the code causing the problem with:

If Not Me.DesignMode Then

End If

Just a thought
Chris
Nov 21 '05 #2

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

Similar topics

0
by: Jason Yau | last post by:
I am having a strange problem with Visual Studio.NET. I am working on a C# project with two forms. I did not open the project for a couple of weeks, and now when I open it up, the 'Design View' of...
7
by: Paul T. Rong | last post by:
Hello, Often when I open one form, and (without closing it) open the form in its design view, then all the caption value of the controls in this form remained there in form's design view that is...
12
by: Raed Sawalha | last post by:
I have the following table which i can not switcha to design view error message said Could not open in Design view. Quote values differently inside a '<% ...."value"... %>' block. and the...
1
by: gjohncock | last post by:
I am working on a project that requires me to be able to enumerate through all the controls that may be selected (ie: showing their selection handles) in a forms design view window. I have managed...
10
by: David Lee Conley | last post by:
When I open the Data Sources window and create a new data source, everything works fine. But if I have a form showing in the IDE, the Data Sources window becomes disabled and doesn't display any...
6
by: Ryan | last post by:
I have 2 forms, Form1.vb and Form2.vb. In Solution Explorer, Form2.vb no longer shows a Form icon nor do I have the option to open Form2.vb in the main explorer window where usually I have the...
2
by: Sandro997 | last post by:
There exist some forms in my application which existed before I arrived. Many of these forms are such that when they are open, then the "design view" button in the toolbar at the top of the screen...
3
by: MLH | last post by:
An A97 application that sometimes stays open for days at a time may have a form, report, table or query open in design view. What's the simplest code snippet that would determine whether any...
46
by: iheartvba | last post by:
Hi, This is driving me absolutley insane! Every time I want to take a very complex from into design view or save it after amending it in design view, it takes ages to save. All I can think of is...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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,...

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.