PC Review


Reply
Thread Tools Rate Thread

Debugging "form designer" code,

 
 
Robin Tucker
Guest
Posts: n/a
 
      30th Mar 2005
Hi,


I have a problem with my code (somewhere in the InitialiseComponent)
preventing any of my controls being visible in form design mode, although
everything is ok at runtime. No errors are produced when I view the form in
the designer; it just presents me with a blank form. Some of the controls
are listed in the properties list, others aren't. What kind of things can
cause this effect and how can I debug it, given that the VS form designer is
"executing" the new() and InitialiseComponent() on my object, rather than
the debugger?


Thanks,



Robin


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      30th Mar 2005
"Robin Tucker" <(E-Mail Removed)> schrieb:
> I have a problem with my code (somewhere in the InitialiseComponent)
> preventing any of my controls being visible in form design mode, although
> everything is ok at runtime. No errors are produced when I view the form
> in the designer; it just presents me with a blank form. Some of the
> controls are listed in the properties list, others aren't. What kind of
> things can cause this effect and how can I debug it, given that the VS
> form designer is "executing" the new() and InitialiseComponent() on my
> object, rather than the debugger?


Make sure that all controls are added to the form's 'Controls' collection or
containers' 'Controls' collections in 'InitializeComponent'
('*.Controls.Add'/'*.Controls.AddRange').

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing the " Web Form Designer Generated Code " region after converting from ASP.NET 1.1 to ASP.NET 2.0 Nathan Sokalski Microsoft Dot NET Framework 6 29th Aug 2006 01:28 AM
Removing the " Web Form Designer Generated Code " region after converting from ASP.NET 1.1 to ASP.NET 2.0 Nathan Sokalski Microsoft Dot NET 6 29th Aug 2006 01:28 AM
"Windows Form Designer generated code" section is hidden when viewing code QLD_AU Microsoft Dot NET 1 19th Dec 2005 03:44 PM
How to generate custom code in the "Windows Form Designer generated code" section =?Utf-8?B?Lk5ldCBEZXZlbG9wZXI=?= Microsoft Dot NET Framework Forms 3 3rd May 2004 03:43 PM
Doing Time in the "Windows Form Designer generated code" region John Sitka Microsoft ADO .NET 5 31st Mar 2004 08:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:47 PM.