473,595 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mysterious error with System.Windows. Forms

I reloaded a WinForms project in VStudio 2003 that has been working perfectly
fine for months. Suddenly I'm getting strange reference errors AND I can no
longer load any form in Designer view.

Yet when I start a new project, everything appears to be working fine.

What might have gone wrong and how do I resolve it?

--
Robert W.
Vancouver, BC
www.mwtech.com

Dec 9 '05 #1
4 1341
Your information on the problem is not complete but as guessing goes did you
move any controls that are used on the form or uninstalled something that
might have corrupted something.
"Robert W." <Ro*****@discus sions.microsoft .com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
I reloaded a WinForms project in VStudio 2003 that has been working
perfectly
fine for months. Suddenly I'm getting strange reference errors AND I can
no
longer load any form in Designer view.

Yet when I start a new project, everything appears to be working fine.

What might have gone wrong and how do I resolve it?

--
Robert W.
Vancouver, BC
www.mwtech.com

Dec 9 '05 #2
Robert,
Are you using some custom project/3rd party Library in your
code. I think you are using function in the constructor of the form
which now u are un able to view in the designer, and that function is
not working properly now(May be a database connection).

Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/

Dec 9 '05 #3
Another wild guess....

1. If you use devenv.exe to compile a silution form the command prompt it
somehow screwup the design time of all forms and controls. I don't know
what's wrong with it, but try to do some modification in the source code
(simple adding of a space somewhere just to make the fild *dirty* and save
it in order to refresh the file on the disk. The close all windows related
to the form or control (code view and designer view) and open them again. It
might help.

2. Make sure that the class declaration of form or control is the first type
decalred in the file. Other wise the designer won't show up. Move all such
decalrations after the form or control class.
--

Stoitcho Goutsev (100) [C# MVP]
"Bajoo" <Na**********@g mail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Robert,
Are you using some custom project/3rd party Library in your
code. I think you are using function in the constructor of the form
which now u are un able to view in the designer, and that function is
not working properly now(May be a database connection).

Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/

Dec 9 '05 #4
Just wanted to thank all of you for your input to my dilemma. As is to be
expected, I suppose, this strange error popped up late last night. Troubling
it was! Before going to sleep I wrote out a 5-step Action plan for today,
that started with reviewing any feedback on this thread and ended with
reinstalling Windows!

Thankfully I was able to solve things with Step #2: Remove the current
project, create another [blank] one in its place and then add the project
files back in.

Everything seems to be working again ... though this was a scary experience!

Thank you all again!

--
Robert W.
Vancouver, BC
www.mwtech.com

"Stoitcho Goutsev (100) [C# MVP]" wrote:
Another wild guess....

1. If you use devenv.exe to compile a silution form the command prompt it
somehow screwup the design time of all forms and controls. I don't know
what's wrong with it, but try to do some modification in the source code
(simple adding of a space somewhere just to make the fild *dirty* and save
it in order to refresh the file on the disk. The close all windows related
to the form or control (code view and designer view) and open them again. It
might help.

2. Make sure that the class declaration of form or control is the first type
decalred in the file. Other wise the designer won't show up. Move all such
decalrations after the form or control class.
--

Stoitcho Goutsev (100) [C# MVP]
"Bajoo" <Na**********@g mail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Robert,
Are you using some custom project/3rd party Library in your
code. I think you are using function in the constructor of the form
which now u are un able to view in the designer, and that function is
not working properly now(May be a database connection).

Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/


Dec 9 '05 #5

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

Similar topics

6
3238
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle." exception. The problem is that this exception isn't raised somewhere in a method, so it just shows up, and it causes the application to shut down. Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
13
2425
by: Max | last post by:
Hi There! I'm having a mysterious error right after I login using Forms Authentication in my ASP.NET app. Below is the error... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. The exception throws at the code that tries to set a property (String data type) at my Menu user control.
2
2204
by: Jeff | last post by:
I'm getting an Object Reference error before I even run my app, and I'm not sure where to look to find the cause. I'd appreciate your help. When I open my Windows Application project, the following Microsoft Development Environment error message displays: "Object reference not set to an instance of an object." Then when I access the design view of one of my forms, the controls on
8
1783
by: jcrouse | last post by:
I am using the following code to trap errors in a sub routine: Try Executable code Catch ex As Exception Dim strInputE As String = Application.StartupPath & "\Error.txt" Dim srE As StreamWriter = File.AppendText(strInputE) srE.WriteLine(vbCr) srE.WriteLine(vbCr) srE.WriteLine(DateTime.Now)
3
2429
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an object :(((( Anyone pls help me to solve this problem!!! thanks in advance,
1
8818
by: Mikey G | last post by:
Hi, I created a simple VB.NET 2003 application through Visual Studio that connects to a MySQL database and loads a table into a Dataset, and then displays that table information in a DataGrid on a form for editing. The table fill works fine, the delete function works fine, but when I try to update a row, the application fails with the following error message: An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in...
0
1718
by: Nonee | last post by:
Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. Anyway, I "published" the vb.net app and moved it to another computer and I get the following error msg when I load the form with the mediaplayer on it. I upgraded this project from a standard vb app to the .net version (vb express anyway) and that is when the problem arose. ...
2
4297
by: scarleton | last post by:
A coworker and I have spent the last day and a half trying to track down this bug in our code. We found the solution and thought we might post it to help others out... The setup: Class FinalForm derives from Class BaseForm that derives from System.Windows.Forms. public class BaseForm : Forms {} public class FinalForm : BaseForm {}
11
5572
by: xenoix | last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource. My PC :- Visual Studio 2005 .NET Framework 2 Component Factory Krypton Tools Test PC :- .Net Framework 2
0
8379
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...
1
8020
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8252
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...
0
6675
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3875
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
3915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
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
1
1491
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.