473,732 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.BHTa bControl bhTabControl1;

private System.Windows. Forms.TabPage tabPage1;

private Bloodhound.BHSt ringTextBox txtCode;

private Bloodhound.BHTe xtBox txtDesc;

private Bloodhound.BHBu tton btnTest;)

But ALL the code dealing with these (like creating instances and adding them
to the form) is GONE from the InitializeCompo nent() 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_recordsDa taTable tblRecids = new exist_recordsDa taTable();

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 2605
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****@bldhoun d.com> wrote in message
news:#2******** ******@TK2MSFTN GP10.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.BHTa bControl bhTabControl1;

private System.Windows. Forms.TabPage tabPage1;

private Bloodhound.BHSt ringTextBox txtCode;

private Bloodhound.BHTe xtBox txtDesc;

private Bloodhound.BHBu tton btnTest;)

But ALL the code dealing with these (like creating instances and adding them to the form) is GONE from the InitializeCompo nent() 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_recordsDa taTable tblRecids = new exist_recordsDa taTable();

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****@b ldhound.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.publi c.dotnet.langua ges.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****@bldhoun d.com> wrote in message
news:#2******** ******@TK2MSFTN GP10.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.BHTa bControl bhTabControl1;

private System.Windows. Forms.TabPage tabPage1;

private Bloodhound.BHSt ringTextBox txtCode;

private Bloodhound.BHTe xtBox txtDesc;

private Bloodhound.BHBu tton btnTest;)

But ALL the code dealing with these (like creating instances and adding them
to the form) is GONE from the InitializeCompo nent() 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_recordsDa taTable tblRecids = new

exist_recordsDa taTable();
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
4091
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 query, I set the 2 primary key values equal to the 2 control values on my form. When I input a value to these 2 controls the query finds the correct record, so I know my query with the criteria works. My problem is trying to get the output values...
4
5810
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 standard controls from the toolbox (mainly radio buttons and labels.) The form itself derives from a base Form which derives from System.Windows.Forms.UserControl. I do this as the base form has a
4
4505
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 others), the controls seem to randomly either disappear or move to different Panels, etc... For instance, I've sized the browser to 100x100 and it will resize itself to a much larger size. Then I'll add a splitter after several trips to code...
2
1429
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 Page_Load(object sender, System.EventArgs e) { if(!Page.IsPostBack) { Switch(Request.Params)
7
2474
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 each with a couple of controls in them I then rebuilt my project and my new panels and all controls they contained are gone... I've looked through the Auto generated code but don't see anything that looks wrong Any body have any idea why this...
2
2592
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 good while and I'm getting really frustrated now! My problem is this - my custom controls periodically disappear from my
6
1504
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 nothing about a solution. Surely their ought to be a patch by now! Just to review, the problem is that at seemingly random intervals, a form will open in design view in VB.net 2003 with some controls missing. (Sometimes just one, and sometimes LOTS...
4
1882
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 continue button on the first page to second page again, all the data entered , even in web server control(not user controls defined by myself.) all disappear. What's going on. I thought dealing with .net should be much easier, did I miss...
1
1940
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 to alter these controls on maximize, minimize or form resize so whatever is causing this is default behavior. The settings on the labels that are disappearing are all default settings with the exception of Font, which is set to Vernanda 8.25pt...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
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
9235
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
8186
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...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3261
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
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.