Hi Everyone.
I have been designing a form with about 100 or so controls and today I
pasted some code from another test project into this one and then all the
controls on the form disapeared from view. If I look at the
Region " Windows Form Designer generated code" section I can see the code
for the controls are there. Except for a few controls, like a tab control and
some labels (these controls are highlighted with errors). Why would this
happen, and how do I get the control back into view. This makes no since.
Thanks for any help.
Michael 10 1369
Michael wrote: Hi Everyone. I have been designing a form with about 100 or so controls and today I pasted some code from another test project into this one and then all the controls on the form disapeared from view. If I look at the Region " Windows Form Designer generated code" section I can see the code for the controls are there. Except for a few controls, like a tab control and some labels (these controls are highlighted with errors). Why would this happen, and how do I get the control back into view. This makes no since. Thanks for any help. Michael
Are you sure the controls aren't there and are just hidden by another
control. There is a dropdown in the property view that shows all
controls on the form. Is your controls listed in there?
Chris
Dear Michael,
Could you please tell us what code was pasted and what the errors are, you
are getting? If the controls on a form have some kind of error, these
controls will not show up. So you need to resolve these first and then (if
you are lucky) you would get the controls visible again (as now, they load
without errors).
Hope I helped you,
Michel van den Berg
"Michael" <Mi*****@discus sions.microsoft .com> schreef in bericht
news:50******** *************** ***********@mic rosoft.com... Hi Everyone. I have been designing a form with about 100 or so controls and today I pasted some code from another test project into this one and then all the controls on the form disapeared from view. If I look at the Region " Windows Form Designer generated code" section I can see the code for the controls are there. Except for a few controls, like a tab control and some labels (these controls are highlighted with errors). Why would this happen, and how do I get the control back into view. This makes no since. Thanks for any help. Michael
"I Don't Like Spam" <no@spam.com> wrote in message
news:e8******** ******@TK2MSFTN GP12.phx.gbl... Are you sure the controls aren't there and are just hidden by another control. There is a dropdown in the property view that shows all controls on the form. Is your controls listed in there?
Chris
I like to use the Document Outline window for this (finding a control on a
form).
Ctrl-Alt-T
Greg
"Greg Burns" <bl*******@news groups.nospam> wrote in message news:uH******** ******@TK2MSFTN GP15.phx.gbl... "I Don't Like Spam" <no@spam.com> wrote in message news:e8******** ******@TK2MSFTN GP12.phx.gbl... Are you sure the controls aren't there and are just hidden by another control. There is a dropdown in the property view that shows all controls on the form. Is your controls listed in there?
Chris
I like to use the Document Outline window for this (finding a control on a form).
Ctrl-Alt-T
It's Ctrl-Alt-D in my IDE (VS.NET 2003)--but it
doesn't "find" any controls on any of my forms...
"Micky" <mi***@n05pam.c om> wrote in message news:dlh2q2$nn7 >> I like to use
the Document Outline window for this (finding a control on a form). Ctrl-Alt-T
It's Ctrl-Alt-D in my IDE (VS.NET 2003)--but it doesn't "find" any controls on any of my forms...
Hmm. Actually being able to search would be nice wouldn't it?
It's Ctrl-Alt-T in both 2003 & 2005 on my machine, wth both [Default
Settings] and VB6 keyboard scheme...
Hi Chris,
THanks for the reply. I had a tabcontrol with about 5 tabpages on it. After
pasting the code into the editor the tabcontrol seemed to have been removed
some how, although 4 of the 5 tabpages where still there. Most of the
controls on the missing tabpage still seem to be listed. Yesterday I took
form into another project and added the Tabcontrol and I'm slowly trying to
rebuild the form by connecting the controls to the tabpages. I'm doing this
by adding the controls back into the tabpages and form with code like this
Me.TabControl1. Controls.Add(Me .TabPage1)
This code is in the "Form Designer generated code" section. Does this help
any.
Thanks again for the reply.
Michael
"I Don't Like Spam" wrote: Michael wrote: Hi Everyone. I have been designing a form with about 100 or so controls and today I pasted some code from another test project into this one and then all the controls on the form disapeared from view. If I look at the Region " Windows Form Designer generated code" section I can see the code for the controls are there. Except for a few controls, like a tab control and some labels (these controls are highlighted with errors). Why would this happen, and how do I get the control back into view. This makes no since. Thanks for any help. Michael
Are you sure the controls aren't there and are just hidden by another control. There is a dropdown in the property view that shows all controls on the form. Is your controls listed in there?
Chris
Hi Michel,
I pasted the code right below the " Windows Form Designer generated code"
region, and the region was closed so it should not have overwriten any of
that code. Right After pasting the code, the tabcontrol disapeared from the
form without any error messages showing. After more investigation, I found 4
of the 5 tabpages in the code (in the region above). Somehow the tabcontrol
and 1 tabpage was totally removed from the form somehow. The form has no code
except for a few other control loading (conbos & flexgrid) functions. Here is
the code I pasted into the form.
Private Sub SetHeaders()
Dim i%
' initialize control
flxFamilyHistor y1.Styles.Norma l.WordWrap = True
flxFamilyHistor y1.Cols.Count = 6
flxFamilyHistor y1.Rows.Fixed = 2
flxFamilyHistor y1.AllowMerging = AllowMergingEnu m.FixedOnly
' create row headers
flxFamilyHistor y1.Rows(0).Allo wMerging = True
' four cells, will merge
Dim rng As CellRange = flxFamilyHistor y1.GetCellRange (0, 1, 0, 2)
rng.Data = "If Living"
' four cells, will merge
rng = flxFamilyHistor y1.GetCellRange (0, 3, 0, 4)
rng.Data = "If Deceased"
flxFamilyHistor y1(1, 1) = "Age"
flxFamilyHistor y1(1, 2) = "Health"
flxFamilyHistor y1(1, 3) = "Age of Death"
flxFamilyHistor y1(1, 4) = "Cause of Death"
flxFamilyHistor y1(1, 5) = "Who"
' create column header
flxFamilyHistor y1.Cols(0).Allo wMerging = True
' two cells, will merge
rng = flxFamilyHistor y1.GetCellRange (0, 0, 1, 0)
rng.Data = "Person"
' align and autozise the cells
flxFamilyHistor y1.Styles.Fixed .TextAlign = TextAlignEnum.C enterCenter
flxFamilyHistor y1.AutoSizeCols (1, flxFamilyHistor y1.Cols.Count - 2,
10)
flxFamilyHistor y1.Cols(5).Widt h = 150
End Sub
Private Sub SetFixedColumn( )
flxFamilyHistor y1(2, 0) = "Father"
flxFamilyHistor y1(3, 0) = "Mother"
flxFamilyHistor y1(4, 0) = "Brothers"
flxFamilyHistor y1(9, 0) = "Sisters"
End Sub
The form will not load right now because the VB generated code still has
references to controls that where removed/lost saying that the control is not
a member of the form. Yet it still has the code like:
Me.Label4 = New System.Windows. Forms.Label
further down in the code:
Me.TabPage1.Con trols.Add(Me.La bel4)
further down in the code:
Me.Label4.Locat ion = New System.Drawing. Point(16, 339)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing. Size(176, 16)
Me.Label4.TabIn dex = 5
Me.Label4.Text = "Have you ever had a transfusion?"
Does any of this make since to anyone. Thanks for the reply and suggestions.
Michael
Dear Michael,
I must admit it is very strange! To resolve this issue please tel me if I
correctly understand you:
- You had a form with many controls on it (question: are these only the
standard winform controls or 3rd party/inherited controls?)
- Next you pasted the code (as shown below = 2 subs).
- Now, suddenly, some controls are gone from your form (questions: Is your
form still drawn in the designer? Are there on this moment any errors? If
yes, then please state the errors)
Hopefully we/I can help you out (otherwise, contacting MS is suggested),
Michel van den Berg
"Michael" <Mi*****@discus sions.microsoft .com> schreef in bericht
news:B7******** *************** ***********@mic rosoft.com... Hi Michel, I pasted the code right below the " Windows Form Designer generated code" region, and the region was closed so it should not have overwriten any of that code. Right After pasting the code, the tabcontrol disapeared from the form without any error messages showing. After more investigation, I found 4 of the 5 tabpages in the code (in the region above). Somehow the tabcontrol and 1 tabpage was totally removed from the form somehow. The form has no code except for a few other control loading (conbos & flexgrid) functions. Here is the code I pasted into the form. Private Sub SetHeaders() Dim i% ' initialize control flxFamilyHistor y1.Styles.Norma l.WordWrap = True flxFamilyHistor y1.Cols.Count = 6 flxFamilyHistor y1.Rows.Fixed = 2 flxFamilyHistor y1.AllowMerging = AllowMergingEnu m.FixedOnly ' create row headers flxFamilyHistor y1.Rows(0).Allo wMerging = True ' four cells, will merge Dim rng As CellRange = flxFamilyHistor y1.GetCellRange (0, 1, 0, 2) rng.Data = "If Living" ' four cells, will merge rng = flxFamilyHistor y1.GetCellRange (0, 3, 0, 4) rng.Data = "If Deceased" flxFamilyHistor y1(1, 1) = "Age" flxFamilyHistor y1(1, 2) = "Health" flxFamilyHistor y1(1, 3) = "Age of Death" flxFamilyHistor y1(1, 4) = "Cause of Death" flxFamilyHistor y1(1, 5) = "Who" ' create column header flxFamilyHistor y1.Cols(0).Allo wMerging = True ' two cells, will merge rng = flxFamilyHistor y1.GetCellRange (0, 0, 1, 0) rng.Data = "Person" ' align and autozise the cells flxFamilyHistor y1.Styles.Fixed .TextAlign = TextAlignEnum.C enterCenter flxFamilyHistor y1.AutoSizeCols (1, flxFamilyHistor y1.Cols.Count - 2, 10) flxFamilyHistor y1.Cols(5).Widt h = 150 End Sub
Private Sub SetFixedColumn( ) flxFamilyHistor y1(2, 0) = "Father" flxFamilyHistor y1(3, 0) = "Mother" flxFamilyHistor y1(4, 0) = "Brothers" flxFamilyHistor y1(9, 0) = "Sisters" End Sub The form will not load right now because the VB generated code still has references to controls that where removed/lost saying that the control is not a member of the form. Yet it still has the code like: Me.Label4 = New System.Windows. Forms.Label further down in the code: Me.TabPage1.Con trols.Add(Me.La bel4) further down in the code: Me.Label4.Locat ion = New System.Drawing. Point(16, 339) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing. Size(176, 16) Me.Label4.TabIn dex = 5 Me.Label4.Text = "Have you ever had a transfusion?" Does any of this make since to anyone. Thanks for the reply and suggestions. Michael
Hi Michel,
The form itself does show in the designer just fine (but no controls show).
I do have 2 Componentone Flaxgrids on the form. All other controls are
standard controls.
There are alot of " 'controlname' is not a member of FormName" errors, but
thats it. Did not have these before the code was pasted to the form.
I'm in the process of fixing it. I do have the tabcontrol back in a test
project. I had to add the control to the form, then I went into the Desiner
generated code and added/fixed the code that loads the tabcontrol and
tabpages. I'm hoping this does not happen again as this can be very time
consuming. This time it lost track of about 20 or so controls. Thanks again
for your time.
Michael
"Michel van den Berg" wrote: Dear Michael,
I must admit it is very strange! To resolve this issue please tel me if I correctly understand you:
- You had a form with many controls on it (question: are these only the standard winform controls or 3rd party/inherited controls?) - Next you pasted the code (as shown below = 2 subs). - Now, suddenly, some controls are gone from your form (questions: Is your form still drawn in the designer? Are there on this moment any errors? If yes, then please state the errors)
Hopefully we/I can help you out (otherwise, contacting MS is suggested),
Michel van den Berg
"Michael" <Mi*****@discus sions.microsoft .com> schreef in bericht news:B7******** *************** ***********@mic rosoft.com... Hi Michel, I pasted the code right below the " Windows Form Designer generated code" region, and the region was closed so it should not have overwriten any of that code. Right After pasting the code, the tabcontrol disapeared from the form without any error messages showing. After more investigation, I found 4 of the 5 tabpages in the code (in the region above). Somehow the tabcontrol and 1 tabpage was totally removed from the form somehow. The form has no code except for a few other control loading (conbos & flexgrid) functions. Here is the code I pasted into the form. Private Sub SetHeaders() Dim i% ' initialize control flxFamilyHistor y1.Styles.Norma l.WordWrap = True flxFamilyHistor y1.Cols.Count = 6 flxFamilyHistor y1.Rows.Fixed = 2 flxFamilyHistor y1.AllowMerging = AllowMergingEnu m.FixedOnly ' create row headers flxFamilyHistor y1.Rows(0).Allo wMerging = True ' four cells, will merge Dim rng As CellRange = flxFamilyHistor y1.GetCellRange (0, 1, 0, 2) rng.Data = "If Living" ' four cells, will merge rng = flxFamilyHistor y1.GetCellRange (0, 3, 0, 4) rng.Data = "If Deceased" flxFamilyHistor y1(1, 1) = "Age" flxFamilyHistor y1(1, 2) = "Health" flxFamilyHistor y1(1, 3) = "Age of Death" flxFamilyHistor y1(1, 4) = "Cause of Death" flxFamilyHistor y1(1, 5) = "Who" ' create column header flxFamilyHistor y1.Cols(0).Allo wMerging = True ' two cells, will merge rng = flxFamilyHistor y1.GetCellRange (0, 0, 1, 0) rng.Data = "Person" ' align and autozise the cells flxFamilyHistor y1.Styles.Fixed .TextAlign = TextAlignEnum.C enterCenter flxFamilyHistor y1.AutoSizeCols (1, flxFamilyHistor y1.Cols.Count - 2, 10) flxFamilyHistor y1.Cols(5).Widt h = 150 End Sub
Private Sub SetFixedColumn( ) flxFamilyHistor y1(2, 0) = "Father" flxFamilyHistor y1(3, 0) = "Mother" flxFamilyHistor y1(4, 0) = "Brothers" flxFamilyHistor y1(9, 0) = "Sisters" End Sub The form will not load right now because the VB generated code still has references to controls that where removed/lost saying that the control is not a member of the form. Yet it still has the code like: Me.Label4 = New System.Windows. Forms.Label further down in the code: Me.TabPage1.Con trols.Add(Me.La bel4) further down in the code: Me.Label4.Locat ion = New System.Drawing. Point(16, 339) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing. Size(176, 16) Me.Label4.TabIn dex = 5 Me.Label4.Text = "Have you ever had a transfusion?" Does any of this make since to anyone. Thanks for the reply and suggestions. Michael
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: winshent |
last post by:
I have copied approx 20 controls from a form to a tab control for
reasons of space.
i now cannot run code triggered by the events of these controls.
for example, the following will not trigger the message box when
changed:
Private Sub cboA_Change()
MsgBox "combo A changed"
|
by: Invalidlastname |
last post by:
Hi,
We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue which is related to the repeater. In the code shown below, if I call Repeater1.Controls.Count in the OnInit (the code fragment was highlighted in...
|
by: Chris Thunell |
last post by:
I have created several grids dynamically and have added them to different
HTML placeholders on a vb.net web form. The grids and controls within them
come up and view beautifully when the web page first starts, but when I
click on a button, and the page comes back, my dynamically created grid and
controls are not visible. Any thoughts? ...
|
by: Henry |
last post by:
Hi,
I have to create a variable amount of controls with events for a windows
form in my vb code.
Private WithEvents T_Label As Label
Private WithEvents T_ButtonDo As Button
I create the controls in a loop in load event of the form:
|
by: Dragon |
last post by:
Hi,
I am trying to create a form and add some controls to it programmatically. I
am pasting the code I have so far, below. here are the issues I am having.
#1. I am having to subtract additional 35 points from the
closeAbuotButton.Top ot the control goes out of form's bounds. I have no
clue why.
#2. I do not know how to access my Close...
| |
by: Rob R. Ainscough |
last post by:
I selected 3 controls that were in a Frame control, I "Cut" the controls and
then pasted them outside the frame on the form. Now, when I double on the
control (hoping to load the default event for that control WITH my source
code in the event) I get a new event with the "_1" appended to the event
sub.
Two work arounds:
1. copy all my...
|
by: richard.tallent |
last post by:
I'm fond of web controls in ASP.NET, but the need for <@ Register%>
blocks at the top of each page is a pain.
ASP.NET 2.0 has a way to centrally register controls in the web.config
file, but it is poorly documented and appears to be broken.
I have added my standard user controls to my web.config file. The MSDN
examples are flat wrong, by...
|
by: Michael |
last post by:
Hi
I wanted to see if this is normal, and if so, how the heck do I correct it.
Take the code below:
if uInfo.RoleName = "ADMIN" then
me.UsersList1.Visible = True
me.POSearch1.LoadSearchOptions(True)
else
me.UsersList1.Visible = False
me.POSearch1.LoadSearchOptions(False )
End If
|
by: mark.bergman |
last post by:
I am porting some old code from Digital Unix to Linux using token
pasting, which is failing to compile (code simplified):
#define DEBUG(strg,v) printf("debugoutput: "##strg##".\n", v);
main()
{
int x = 5;
DEBUG("variable x is %d",x);
}
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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. ...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |