473,418 Members | 2,038 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,418 software developers and data experts.

Windows Forms Generated Code vs .Designer.vb

2005 uses the Partial Class & <form>.Designer.vb for its "windows forms
generated code"

Anyone know if its faster/better then old 2003 way?

Also, when upgrading a 2003 project it did not change that, it left it the
"old way", is there a easy way to split them up or do I have to do it
manually If I want to do it?

Regards
Fredrik
Nov 23 '05 #1
5 4253
Frederik,

Anyone know if its faster/better then old 2003 way?
It is not faster/better, it is easier to handle. The partial class is still
a part of the complete class.

However I like it more.
Also, when upgrading a 2003 project it did not change that, it left it the
"old way", is there a easy way to split them up or do I have to do it
manually If I want to do it?

I don't know yet however I would be very surprised as you see how you can
interfere in the by the designer created code by instance adding overloaded
subs New.

I do it on what you call manually by copying and pasting, while I have not
found yet what is the method I like the most.

Cor


Nov 23 '05 #2
VB 2005 has gone back to the "magic behind the scenes" approach of VB6. For
instance, you might wonder why a new VB 2005 form doesn't have a (visible)
constructor and nowhere will you find a (visible) call to the hidden
constructor.

Also, you might wonder why the access modifiers are different on the two
portions of the partial form class (can it be instantiated from outside the
project or not...?).

Anyway, to answer your main questions, it's not faster and it's fine to
leave it the "old way".

--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter

"Fredrik Melin" wrote:
2005 uses the Partial Class & <form>.Designer.vb for its "windows forms
generated code"

Anyone know if its faster/better then old 2003 way?

Also, when upgrading a 2003 project it did not change that, it left it the
"old way", is there a easy way to split them up or do I have to do it
manually If I want to do it?

Regards
Fredrik

Nov 23 '05 #3
Fredrik,
In addition to the other comments.

One reason its "better" then the old 2003 way in that a developer has little
or no chance of accidentally changing the designer generated code. As you
have to show hidden files, expand the Form's node in solution explorer, open
the designer.vb file... Yes it can be done, just takes more effort.

In ASP.NET projects its "better" as you're not dealing with the .aspx
inheriting from the .vb file any more, it simplifies some constructs
there...

I don't see that it is "faster" as a single class is still created.

I have manually moved the "Windows Forms Generated Code" to Designer.vb
files in a handful of projects I upgraded from 2003 to 2005. No real need
just seeing if one could do it. I normally create a new form in 2005 to see
what the code looks like & then cut & paste the 2003 code to match the
general layout of the 2005 code. VS seems to be none the wiser.

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Fredrik Melin" <me*@no-spam.dacsa-remove-this.net> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
| 2005 uses the Partial Class & <form>.Designer.vb for its "windows forms
| generated code"
|
| Anyone know if its faster/better then old 2003 way?
|
| Also, when upgrading a 2003 project it did not change that, it left it the
| "old way", is there a easy way to split them up or do I have to do it
| manually If I want to do it?
|
| Regards
| Fredrik
|
|
Nov 23 '05 #4
Ok, thanks.
I really like the "cleaner" look for day to day programming with the new
..Designer model.

just that my project is 233 forms, will take a while doing cut and paste,
but I take them as they come.

"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
Fredrik,
In addition to the other comments.

One reason its "better" then the old 2003 way in that a developer has
little
or no chance of accidentally changing the designer generated code. As you
have to show hidden files, expand the Form's node in solution explorer,
open
the designer.vb file... Yes it can be done, just takes more effort.

In ASP.NET projects its "better" as you're not dealing with the .aspx
inheriting from the .vb file any more, it simplifies some constructs
there...

I don't see that it is "faster" as a single class is still created.

I have manually moved the "Windows Forms Generated Code" to Designer.vb
files in a handful of projects I upgraded from 2003 to 2005. No real need
just seeing if one could do it. I normally create a new form in 2005 to
see
what the code looks like & then cut & paste the 2003 code to match the
general layout of the 2005 code. VS seems to be none the wiser.

--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Fredrik Melin" <me*@no-spam.dacsa-remove-this.net> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl...
| 2005 uses the Partial Class & <form>.Designer.vb for its "windows forms
| generated code"
|
| Anyone know if its faster/better then old 2003 way?
|
| Also, when upgrading a 2003 project it did not change that, it left it
the
| "old way", is there a easy way to split them up or do I have to do it
| manually If I want to do it?
|
| Regards
| Fredrik
|
|

Nov 23 '05 #5
Fredrik,
| just that my project is 233 forms, will take a while doing cut and paste,
| but I take them as they come.
One might be able to create a macro and/or console program that does the
work for you.

If I have time later this weekend, maybe I will look at creating one...

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Fredrik Melin" <me*@n.o.spam.dacsa.net.remove.as.needed> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
| Ok, thanks.
| I really like the "cleaner" look for day to day programming with the new
| .Designer model.
|
| just that my project is 233 forms, will take a while doing cut and paste,
| but I take them as they come.
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
| message news:%2****************@tk2msftngp13.phx.gbl...
| > Fredrik,
| > In addition to the other comments.
| >
| > One reason its "better" then the old 2003 way in that a developer has
| > little
| > or no chance of accidentally changing the designer generated code. As
you
| > have to show hidden files, expand the Form's node in solution explorer,
| > open
| > the designer.vb file... Yes it can be done, just takes more effort.
| >
| > In ASP.NET projects its "better" as you're not dealing with the .aspx
| > inheriting from the .vb file any more, it simplifies some constructs
| > there...
| >
| > I don't see that it is "faster" as a single class is still created.
| >
| > I have manually moved the "Windows Forms Generated Code" to Designer.vb
| > files in a handful of projects I upgraded from 2003 to 2005. No real
need
| > just seeing if one could do it. I normally create a new form in 2005 to
| > see
| > what the code looks like & then cut & paste the 2003 code to match the
| > general layout of the 2005 code. VS seems to be none the wiser.
| >
| > --
| > Hope this helps
| > Jay [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley - http://www.tsbradley.net
| >
| >
| > "Fredrik Melin" <me*@no-spam.dacsa-remove-this.net> wrote in message
| > news:Oi**************@TK2MSFTNGP10.phx.gbl...
| > | 2005 uses the Partial Class & <form>.Designer.vb for its "windows
forms
| > | generated code"
| > |
| > | Anyone know if its faster/better then old 2003 way?
| > |
| > | Also, when upgrading a 2003 project it did not change that, it left it
| > the
| > | "old way", is there a easy way to split them up or do I have to do it
| > | manually If I want to do it?
| > |
| > | Regards
| > | Fredrik
| > |
| > |
| >
| >
|
|
Nov 23 '05 #6

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

Similar topics

1
by: gregory_may | last post by:
This code seems to "work" but I get the following errors: An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll then this one: An unhandled...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
5
by: david | last post by:
I have developed my web service with a domain name of my computer name and wwwroot directory. I also developed a client of windows form application. It works locally (i.e. in the same machine). ...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
8
by: Alison | last post by:
Hi, Al I am trying to design a user interface which provides both menus and toolbars for some users to click on whatever they want to do, at the same time, I would like to have a console window...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
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
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...
0
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...

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.