473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

what happened to my form??? Bug???

i dont understand this behaviour...

i open a vb form i created and want to save it as a new name and make some
changes

when i do (in vs2005) the original form looses its ui

whats up with that??? it turned into a straight class

Apr 10 '07 #1
12 8599
Look at the code behind class. If you have the original and the new one both
in the same project, both code behind classes probably have the same name.
Change the new one to something else and you should once again see it as a
form.

I am not sure this is exactly whats happening in your case but it sounds
quite likely.

"Brad" <Br**@discussions.microsoft.comwrote in message
news:5A**********************************@microsof t.com...
>i dont understand this behaviour...

i open a vb form i created and want to save it as a new name and make some
changes

when i do (in vs2005) the original form looses its ui

whats up with that??? it turned into a straight class

Apr 10 '07 #2

tried that, still lost ui designer link to my original form

Apr 10 '07 #3
I just created a simple windows application, saved it and then opened up the
default form (Form1) created. Then i chose save as Form2. After VS saved my
changes, my project now contained form2 and form1 was no longer part of the
project. Is this the problem you are having?

If so what is happening is that you are not really adding a new form. You
are just renaming the existing one. If you want to duplicate an existing
form, the easiest way is to copy the designer.vb and .vb files and then
rename them. After they have been renamed just add them using "Add Existing
Item" to your project, change the class name and you should have both forms
in your project.

Let me know the steps you are following or you can send the project and we
should be able to identify the problem.
Regards
Parag
"Brad" <Br**@discussions.microsoft.comwrote in message
news:F6**********************************@microsof t.com...
>
tried that, still lost ui designer link to my original form

Apr 10 '07 #4
no, thats not the problem

i open form1

click on file, save as, and name it form2

both form1 and form 2 show up in the project

but the ability to go to the form designer on form1 is lost

verified same functionality using vs2003
Apr 17 '07 #5
HI Brad
Is this the error you are getting when you try to open the designer:

Failed to parse method 'InitializeComponent'. The parser reported the
following error 'Error HRESULT E_FAIL has been returned from a call to a COM
component.'. Please look in the Task List for potential errors.
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomParser.OnMethodPopulateStatements(Objec t
sender, EventArgs e)
at System.CodeDom.CodeMemberMethod.get_Statements()
at
System.ComponentModel.Design.Serialization.TypeCod eDomSerializer.Deserialize(IDesignerSerializationM anager
manager, CodeTypeDeclaration declaration)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad(IDesignerSerializationM anager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.PerformLoad(IDesignerSer ializationManager
serializationManager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.DeferredLoadHandler.Micr osoft.VisualStudio.TextManager.Interop.IVsTextBuff erDataEvents.OnLoadCompleted(Int32
fReload)

Regards
Parag

"Brad" <Br**@discussions.microsoft.comwrote in message
news:D8**********************************@microsof t.com...
no, thats not the problem

i open form1

click on file, save as, and name it form2

both form1 and form 2 show up in the project

but the ability to go to the form designer on form1 is lost

verified same functionality using vs2003

Apr 17 '07 #6
if i right click on Form1 i no longer have the option to open it in the
designer
i can click on open and see the code only

Form1 shows up in the Solution Explorer list with a White Page Icon
it has two items underneath it, form1.designer.vb and form1.resx both with
the same icons (the white page)

Form2 shows up with the Dialog Icon, and the two files underneath
(designer.vb and resx) both have a page with writing with a blue arrow going
into it

right clicking on form2 in the se does give me the view designer option

Apr 17 '07 #7
HI Brad
Are you able to copy the declarations of the following files and post them?

Form1.vb
Form1.designer.vb
form2.vb
form2.designer.vb

Just the first three lines should be sufficient.
Regards
Parag
"Brad" <Br**@discussions.microsoft.comwrote in message
news:0B**********************************@microsof t.com...
if i right click on Form1 i no longer have the option to open it in the
designer
i can click on open and see the code only

Form1 shows up in the Solution Explorer list with a White Page Icon
it has two items underneath it, form1.designer.vb and form1.resx both with
the same icons (the white page)

Form2 shows up with the Dialog Icon, and the two files underneath
(designer.vb and resx) both have a page with writing with a blue arrow
going
into it

right clicking on form2 in the se does give me the view designer option

Apr 17 '07 #8
My forms are named TitleList and TitleList2:

TitleList.vb
#Region "Imports"
#End Region
Public Class TitleList

TitleList.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class TitleList
Inherits System.Windows.Forms.Form

TitleList2.VB
#Region "Imports"
#End Region
Public Class TitleList

TitleList2.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class TitleList
Inherits System.Windows.Forms.Form

If i rename Class to TitleList2 in the second form it doesnt fix the problem
either
Apr 18 '07 #9
HI Brad
I see your problem. Change the following two declarations and i feel your
problem will go away.

TitleList2.VB
#Region "Imports"
#End Region
Public Class TitleList2 ----Changed here.

TitleList2.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class TitleList2 ----Changed here
Inherits System.Windows.Forms.Form
Let me know if that worked.
Regards
Parag

"Brad" <Br**@discussions.microsoft.comwrote in message
news:E3**********************************@microsof t.com...
My forms are named TitleList and TitleList2:

TitleList.vb
#Region "Imports"
#End Region
Public Class TitleList

TitleList.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class TitleList
Inherits System.Windows.Forms.Form

TitleList2.VB
#Region "Imports"
#End Region
Public Class TitleList

TitleList2.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Partial Class TitleList
Inherits System.Windows.Forms.Form

If i rename Class to TitleList2 in the second form it doesnt fix the
problem
either

Apr 18 '07 #10
i mentioned in the previous post that doing that did not fix the problem

Apr 18 '07 #11
Would it be possible for you to attach the solution in a zip file? It sound
like this is a bug that should be reported to microsoft. I believe microsoft
connect has a site to report vs.net issues.

"Brad" <Br**@discussions.microsoft.comwrote in message
news:0A**********************************@microsof t.com...
>i mentioned in the previous post that doing that did not fix the problem

Apr 19 '07 #12
HI Brad
Here is the site used to report studio issues:
http://connect.microsoft.com/VisualStudio/

Regards
Parag

"Parag Joshi" <pa***@nospam.nospamwrote in message
news:en**************@TK2MSFTNGP03.phx.gbl...
Would it be possible for you to attach the solution in a zip file? It
sound like this is a bug that should be reported to microsoft. I believe
microsoft connect has a site to report vs.net issues.

"Brad" <Br**@discussions.microsoft.comwrote in message
news:0A**********************************@microsof t.com...
>>i mentioned in the previous post that doing that did not fix the problem


Apr 19 '07 #13

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

Similar topics

47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
2
by: N J | last post by:
Hi, Please take a look at http://webmonky.myby.co.uk/error.JPG . This is the second time this has happened. All I did was run command ... CurrentDb.Execute "Update tblDownload Set OrderType =...
1
by: JS | last post by:
Hello, I am using ASP .Net to create my own web controls and I have noticed that there is one too many requirements that forces the developer to be aware of and get involved with. In the past...
2
by: Moheb | last post by:
I've got the following code: <%= "myText = " + Request.Form %> <form id="Form1" method="post" runat="server"> <input type="text" id="myText"> <input type="button" value="submit"> </form> ...
9
by: Jay | last post by:
Everywhere I go (read/browse) I see these parameters.... ByVal sender As Object, ByVal e As System.EventArgs Yet I never see them used within the function/method. Could someone tell me what they...
0
by: **Developer** | last post by:
This is almost the same as a previous post that is still giving me a problem, but with a different slant. I can't seem to find out what is wrong. My program crashes after it leaves an event...
8
by: bdobby | last post by:
Hi. I am relatively new to js, but I did think I was starting to get the hang of it. Then this happened... I have a form with an onsubmit event handler: <form id="uploadForm" method="post"...
1
by: Steve Richter | last post by:
a simple web page that adds controls to a Panel control at run time. Problem is, on PostBack, all the controls I added to the Panel are missing! ViewState is enabled on the panel. What happened to...
3
by: Giampaolo Rodola' | last post by:
http://groups.google.com/group/python-dev2 It seems it no longer exists. What happened?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.