R
Rachel Suddeth
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
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