472,811 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

disappearing controls

Here is my scenario:
I have a few custom controls that I set up on a form and tested setting
properties and appearances.
Then I added a couple references to the project which add classes I need to
get data from the server to actually do something useful. (These are
generated by 3rd party database software.)

After adding those references, and no other changes to my form.... all the
controls disappear from the visual interface on the form. In the code...
declarations are still there
(eg:
private Bloodhound.BHTabControl bhTabControl1;

private System.Windows.Forms.TabPage tabPage1;

private Bloodhound.BHStringTextBox txtCode;

private Bloodhound.BHTextBox txtDesc;

private Bloodhound.BHButton btnTest;)

But ALL the code dealing with these (like creating instances and adding them
to the form) is GONE from the InitializeComponent() method.

----

I can not see why adding a couple references should change this, but I
compiled and ran the thing before adding those references... OH... I guess I
did a definition that needed the references and it didn't compile...

private exist_recordsDataTable tblRecids = new exist_recordsDataTable();

This needed types defined in a reference I hadn't added. So I tried to
recompile, and it failed. I added the references and it compiled, but wiped
out a bunch of other code I had. Why would it do that?

I have had designer-set properties (such as label text and locations)
disappear mysteriously before...
I added designer code to the properties I exposed of the nature
[DefaultValue(x)], and that seemed to take care of the problem until now.
Maybe this is a bug in the 3rd party stuff... but what causes this sort of
thing to happen in C# and are there procedures I can do to prevent it, or
something I can tell 3rd party developers to look at?
__________________________________________________ ____________
Roydan Enterprises Ltd
602 North 9th Street
Manitowoc, WI 54220-3924
1-800-236-6906 (920)-684-3688
Fax: (920)-684-3630
Nov 16 '05 #1
2 2533
I have seen this happen with Visual Inheritance when attempting to change
something on the base class. One workaround is to save the form, then CLOSE
the form in the IDE, and build.
When forms are reopened in the IDE everything should stay. In rare cases,
it may even be necessary to close VS.NET and then open it again and reload
the solution.
HTH
--Peter

"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:#2**************@TK2MSFTNGP10.phx.gbl...
Here is my scenario:
I have a few custom controls that I set up on a form and tested setting
properties and appearances.
Then I added a couple references to the project which add classes I need to get data from the server to actually do something useful. (These are
generated by 3rd party database software.)

After adding those references, and no other changes to my form.... all the
controls disappear from the visual interface on the form. In the code...
declarations are still there
(eg:
private Bloodhound.BHTabControl bhTabControl1;

private System.Windows.Forms.TabPage tabPage1;

private Bloodhound.BHStringTextBox txtCode;

private Bloodhound.BHTextBox txtDesc;

private Bloodhound.BHButton btnTest;)

But ALL the code dealing with these (like creating instances and adding them to the form) is GONE from the InitializeComponent() method.

----

I can not see why adding a couple references should change this, but I
compiled and ran the thing before adding those references... OH... I guess I did a definition that needed the references and it didn't compile...

private exist_recordsDataTable tblRecids = new exist_recordsDataTable();

This needed types defined in a reference I hadn't added. So I tried to
recompile, and it failed. I added the references and it compiled, but wiped out a bunch of other code I had. Why would it do that?

I have had designer-set properties (such as label text and locations)
disappear mysteriously before...
I added designer code to the properties I exposed of the nature
[DefaultValue(x)], and that seemed to take care of the problem until now.
Maybe this is a bug in the 3rd party stuff... but what causes this sort of
thing to happen in C# and are there procedures I can do to prevent it, or
something I can tell 3rd party developers to look at?
__________________________________________________ ____________
Roydan Enterprises Ltd
602 North 9th Street
Manitowoc, WI 54220-3924
1-800-236-6906 (920)-684-3688
Fax: (920)-684-3630

Nov 16 '05 #2
Oops.

Thanks again, Peter. I had a book that said "Visual Inheritance" is the same
as form inheritance, but this makes a lot more sense to me. At least that it
would include anything that has a "design surface" you can look at in VS. So
far it is working to close the test project before compiling changes to the
base, so I will add that into the document of procedures for adding changes
to these classes.

-Rachel

----- Original Message -----
From: "Peter Bromberg"
To: "'Rachel Suddeth (Bloodhound Software)'"
Sent: Monday, August 23, 2004 10:40 AM
Subject: RE: disappearing controls

Rachel,
When you reply to a newsgroup post, it is customary to reply to the group,
not to the poster via email.
My use of the term "Visual Inheritance" meant deriving anything from
something else that has a UI, in order to inherit and / or
override the UI.
Peter

-----Original Message-----
From: Rachel Suddeth (Bloodhound Software) [mailto:ra****@bldhound.com]
Sent: Monday, August 23, 2004 10:16 AM
To: Peter Bromberg [C# MVP]
Subject: Re: disappearing controls

Thanks - I'll give that a try & if it works we'll at least know the
procedure. Could be an argument for using a separate solution for the base
controls & forms... that would help to enforce closing forms while working
on base items.

By "Visual Inheritance" do you mean using an inherited form? Or does that
apply to inherited control as well (using the "Add Inherited Control" from
the "project" menu...) Just not sure about the terminology. We are using an inherited form & I'm trying to remember whether I saw any of that stuff
before I started testing with that (started with the controls on a standard form first.)

Thanks,
Rachel

----- Original Message -----
From: "Peter Bromberg [C# MVP]"
Newsgroups: microsoft.public.dotnet.languages.csharp
Sent: Saturday, August 21, 2004 8:17 AM
Subject: Re: disappearing controls

I have seen this happen with Visual Inheritance when attempting to change
something on the base class. One workaround is to save the form, then CLOSE
the form in the IDE, and build.
When forms are reopened in the IDE everything should stay. In rare cases, it may even be necessary to close VS.NET and then open it again and reload the solution.
HTH
--Peter

"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:#2**************@TK2MSFTNGP10.phx.gbl...
Here is my scenario:
I have a few custom controls that I set up on a form and tested setting properties and appearances.
Then I added a couple references to the project which add classes I need
to
get data from the server to actually do something useful. (These are
generated by 3rd party database software.)

After adding those references, and no other changes to my form.... all the controls disappear from the visual interface on the form. In the
code... declarations are still there
(eg:
private Bloodhound.BHTabControl bhTabControl1;

private System.Windows.Forms.TabPage tabPage1;

private Bloodhound.BHStringTextBox txtCode;

private Bloodhound.BHTextBox txtDesc;

private Bloodhound.BHButton btnTest;)

But ALL the code dealing with these (like creating instances and adding them
to the form) is GONE from the InitializeComponent() method.

----

I can not see why adding a couple references should change this, but I
compiled and ran the thing before adding those references... OH... I

guess
I
did a definition that needed the references and it didn't compile...

private exist_recordsDataTable tblRecids = new

exist_recordsDataTable();
This needed types defined in a reference I hadn't added. So I tried to
recompile, and it failed. I added the references and it compiled, but

wiped
out a bunch of other code I had. Why would it do that?

I have had designer-set properties (such as label text and locations)
disappear mysteriously before...
I added designer code to the properties I exposed of the nature
[DefaultValue(x)], and that seemed to take care of the problem until

now. Maybe this is a bug in the 3rd party stuff... but what causes this
sort of thing to happen in C# and are there procedures I can do to prevent it, or something I can tell 3rd party developers to look at?
__________________________________________________ ____________
Roydan Enterprises Ltd
602 North 9th Street
Manitowoc, WI 54220-3924

Nov 16 '05 #3

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

Similar topics

2
by: neptune | last post by:
I built a form to access a query with a 2 field primary key. It should use 2 controls to find the unique record and display the other field values on the form. In the criteria section of the...
4
by: Steve | last post by:
Hi All, I've seen many postings regarding different situations where controls disappear but have never seen a decent solution. Here is the problem. I have a form onto which I am placing some...
4
by: Frank Rizzo | last post by:
Hello, I have a form that contains the Browser control (via interop, of course) among other things. The browser control is in a Panel control. When I add other controls (such as splitter and some...
2
by: Grant Merwitz | last post by:
I am using usercontrols to control the contant in my website. Currently, depending on a parameter passed in the querystring, the appropriate usercontrol will be loaded. i.e. private void...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
6
by: George Yefchak | last post by:
Hi folks, What's the latest news on the "disappearing controls" issue? I've seen a few posts over the last several months indicating that other people have the same problem, but I've seen...
4
by: c676228 | last post by:
Hi all, the data disappearing problem occurs to all my controls even my regualr web control like asp:textbox, when I click back button in web browser from second page to first page and then click...
1
by: JDeats | last post by:
I have many labels that are disappearing from my form when the user resizes it, they seem to dissapear when certain width/height thresholds are exceeded. I have no code in place purposely trying...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.