Re: Windows form designer generated code being misplaced
- From: Jack Jackson <jjackson@xxxxxxxxxxxxxxxx>
- Date: Sun, 27 Jan 2008 09:40:03 -0800
On Sat, 26 Jan 2008 20:49:15 -0800 (PST), BobRoyAce
<broy@xxxxxxxxxxxxxxxxxxxx> wrote:
In the cases where there is no Designer.vb file associated with the
form, how do I go about creating the corresponding Designer.vb file?
Do I just add a new class file to the same folder where the form files
are and name it Form.Designer.vb, where Form is the name of the form?
Then, I just grab the windows-generated code from Form.vb and put it
in there (with the needed Partial Class declaration at the beginning)?
I also have never had this happen with projects created in VS2005.
However, if you have such a file and want to add a designer.vb file,
this is how to do it:
Create the xx.designer.vb file.
Add the xx.designer.vb file to the project with Project -> Add
Existing Item.
Close the project.
Make a copy of the .vbproj file in case something goes wrong.
Edit the .vbproj file in a text editor like Notepad. Find the lines
describing the xx.designer.vb file. It should look something like:
<Compile Include="ctlEditbox.Designer.vb" />
Expand the <Compile /> clause to have an ending tag and add a
DependentUpon clause:
<Compile Include="ctlEditbox.Designer.vb">
<DependentUpon>ctlEditbox.vb</DependentUpon>
</Compile>
.
- References:
- Windows form designer generated code being misplaced
- From: BobRoyAce
- Re: Windows form designer generated code being misplaced
- From: RobinS
- Re: Windows form designer generated code being misplaced
- From: BobRoyAce
- Windows form designer generated code being misplaced
- Prev by Date: Re: "Replacing" an object in a List(Of Object)
- Next by Date: Re: Reusable Windwows Design in C#
- Previous by thread: Re: Windows form designer generated code being misplaced
- Next by thread: "Argument 'Path' is Nothing or empty" error when start object set
- Index(es):
Relevant Pages
|