473,657 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4270
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******** ******@TK2MSFTN GP10.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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.d acsa.net.remove .as.needed> wrote in message
news:ug******** ******@tk2msftn gp13.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******** ********@tk2msf tngp13.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******** ******@TK2MSFTN GP10.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
5969
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 exception of type 'System.ExecutionEngineException' occurred in system.windows.forms.dll Anyone know how to either trap these errors or prevent them from happening?
6
2547
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 communicated solely through static method and Invoke()'s However, when I close my second form, the first one (main window) is hiding under all the windows on the desktop. If I don't close the splash screen, then everything is fine. I tried...
5
11354
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 changes that have been made. In MFC/Win32, you'd trap the WM_COMMAND/EN_CHANGE notification messages, etc. But, this doesn't seem to happen in Windows Forms. I tried Spy-ing a windows forms app, and the WM_COMMAND messages don't even get sent...
5
1809
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). When I copy my client application to another machine and start it, I got an error about initialized problem. Note that I can browser my web service .asmx file from the second machine. The sample client source code:
1
3446
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 going wrong. The program has been written to do the following tasks: - Select remote server - Select from two specific services
0
3931
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 - Select from two specific services - Check the status of the server
8
18638
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 available in the same form for users to enter commands and display outputs if some prefer to use character based user interface. I would like to implement the user interface in vb .net. Now I have menus and toolbars ready, but do not now how to get a...
4
3147
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 further away, completely leaving the selector box area. Any ideas? VS 2003 and VB.Net This is a simple application at the moment but the form is inherited from a
21
3339
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 a zipcode that is unknown this form will open. I don't want users to modify any of this customers data until they close the zipcode form. Normally this can accomplished using a modal form, however this prevents me from opening a new copy of...
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
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, 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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1732
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.