-
Windows form designer generated code VB
Hello,
I hope this question is quite simple to answer. I'll try to explain the problem as good as I can.
I've had an introductin course to VB.net, the version was 2003. In this course they showed me when you create a windows form, VB automatically generates some code to create the form, something like this:
Code:
Public class Form1
Inherits from System.Windows.forms.form
#Region " Windows Form Designer generated code "
Public sub New()
Mybase.new()
'This call is required by the windows form designer.
InitializeComponent()
.......
end class
I'm sure this is familiar to you all.
Now I've purchased myself the visual studio 2005 professional edition and installed it. I've started the application, made a new project with VB and added a form. When I double click the form, I don't find the above code anywhere??? How does this come? Is it an option that I have to turn on/off or is this code deleted in the VS2005? Can somebody explain what's happening, because I'm a little confused.
Thanks.
Benjamin
-
.NET 2.0 adds a feature called "partial classes," which allows a single class to be defined across multiple source files. Rather than including the designer-generated code in your form file, VB 2005 puts it in a partial class in a file named Form1.Designer.vb.
If you select Project -> Show All Files and then click the little plus sign next to your form in the Solution Explorer, you'll see the Designer file and can open it in Visual Studio.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Thanks Phil, this is what I was looking for.
Benjamin
Similar Threads
-
By Arthur Wood in forum .NET
Replies: 7
Last Post: 10-28-2002, 12:10 PM
-
Replies: 150
Last Post: 03-04-2002, 05:40 PM
-
Replies: 90
Last Post: 04-17-2001, 12:45 AM
-
By Lawrence Brabham in forum authorevents.morrison
Replies: 1
Last Post: 11-13-2000, 10:28 PM
-
By Aivosto in forum vb.announcements
Replies: 0
Last Post: 09-25-2000, 02:02 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks