473,487 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form Wizard not working

Hi Everyone,
I'm hoping someone out there can give me some guidance. I'm currenlty using
VS2005 and the other day the Form Wizzard stopped working. What I mean, is
that the wizzard no longer creates the code in the "Windows Form Designer
generated code" section. As a matter a fact, if I add a new form to the
project, that section is not even there. The only code that you will see is:
Public Class Form2

End Class

As you can see, it just creates an empty class. If I add controls to the
form, it seems like things are working, but I can check the code again, and
no code is added to the file. And if I work with it long anough, the controls
will disappear (happened to me yesterday). How the heck is this happening.
WHY IS THIS HAPPENING MS.
Whats strange is that I have other forms in the project that I created
before this problem and they are working as expected. I even tried copying
the code from a good form and deleting any reference to the controls (in the
old form) in the new form. It won't add the code for the new control in the
Form designer section. Sometimes I get an error
Error 70
'components' is already declared as 'Private Dim components As
System.ComponentModel.IContainer' in this class.

on the line:
"Private components As System.ComponentModel.IContainer"
when I paste the code into the new form. And there is no other references
(at least in this code file) to this line. Has anyone seen anything like
this. PLEASE Help.
Thanks
Mike

Feb 24 '06 #1
4 1676

How the form designer works has changed from '03 to '05.

'05 makes use of Parital classes and places all the formly known as
'Windows Form Designer Generated Code' in a separate file.

Click on the Show All Files button to show the new 'Form2.Designer.vb'
file

hth,
alan.

Feb 24 '06 #2
I have a question for you all. I've been diging some and have found some code
in the file frmRemarks.Designer.VB file that looks like the code that is
missing in the main (.vb) file. Here is the code:

<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()> _

Partial Class frmRemarks

Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.

<System.Diagnostics.DebuggerNonUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing AndAlso components IsNot Nothing Then

components.Dispose()

End If

MyBase.Dispose(disposing)

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _

Private Sub InitializeComponent()

Me.SuspendLayout()

''frmRemark

'Me.ClientSize = New System.Drawing.Size(540, 266)

Me.Name = "frmRemarks"

Me.ResumeLayout(False)

End Sub

Friend WithEvents cmdSave As System.Windows.Forms.Button

Friend WithEvents cmdExit As System.Windows.Forms.Button

Friend WithEvents cmdCancel As System.Windows.Forms.Button

Friend WithEvents cmdAdd As System.Windows.Forms.Button

End Class

As you may have noticed that this version does not have the New constructor.
Is this where my problem lies. If so, why does this code now show up in this
file instead of the .VB file. Thanks for any info.

Michael
"Michael" wrote:
Hi Everyone,
I'm hoping someone out there can give me some guidance. I'm currenlty using
VS2005 and the other day the Form Wizzard stopped working. What I mean, is
that the wizzard no longer creates the code in the "Windows Form Designer
generated code" section. As a matter a fact, if I add a new form to the
project, that section is not even there. The only code that you will see is:
Public Class Form2

End Class

As you can see, it just creates an empty class. If I add controls to the
form, it seems like things are working, but I can check the code again, and
no code is added to the file. And if I work with it long anough, the controls
will disappear (happened to me yesterday). How the heck is this happening.
WHY IS THIS HAPPENING MS.
Whats strange is that I have other forms in the project that I created
before this problem and they are working as expected. I even tried copying
the code from a good form and deleting any reference to the controls (in the
old form) in the new form. It won't add the code for the new control in the
Form designer section. Sometimes I get an error
Error 70
'components' is already declared as 'Private Dim components As
System.ComponentModel.IContainer' in this class.

on the line:
"Private components As System.ComponentModel.IContainer"
when I paste the code into the new form. And there is no other references
(at least in this code file) to this line. Has anyone seen anything like
this. PLEASE Help.
Thanks
Mike

Feb 24 '06 #3
Ok Thanks for the help on that. I actually just noticed that and was going to
ask about that now, lol... Is this also the case for forms that came from
VS2003. Because most of my forms have the Designer code inside the .VB file.
Thanks again.
Michael

"AlanT" wrote:

How the form designer works has changed from '03 to '05.

'05 makes use of Parital classes and places all the formly known as
'Windows Form Designer Generated Code' in a separate file.

Click on the Show All Files button to show the new 'Form2.Designer.vb'
file

hth,
alan.

Feb 24 '06 #4
A form that is converted from 2003 does not have a designer.vb and does
have a ctor with a call to InitializeComponent().

A form created under 2005 has a designer.vb file and does not have (nor
appear to need) a ctor - NOTE if you try to add a ctor to the class it
will add the call to InitializeComponent() for you and give a compiler
warning if you don't have one.

So a 'missing' new() function in a 2005 created form is not
neccessarily causing your problem.
I'm afraid that I haven't looked at the concepts much beyond this
point.

hth,
Alan.

hth,
Al

Feb 27 '06 #5

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

Similar topics

4
5019
by: Rick Brown | last post by:
I have a form built in Access2000 that looks like the hardcopy in all ways including color. I now want to move this form to the company Intra-Net via ASP.NET. Is there a way to wizard this form...
25
10162
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
1893
by: uv | last post by:
Hi! I'm having problems submitting a new record through the form. I'm working with the wizard and I've added a control button to my form for entering entering a new record but for some reason it...
4
3154
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
4
1978
by: Adam Clauss | last post by:
This may be more of a Visual Studio question than a C# question, but it came up within the context of a C# app, so here it is. In a Windows Form or a Web Form application, you can drag various...
6
5983
by: Bob | last post by:
I've located instruction as to how to add the Data Form Wizard into a VB.NET 2005 project at this location. ...
8
24467
by: gracealic | last post by:
I am new to access can someone tell me how do we send the data entered from an inquiry form to a table. say i have a form which has fields client name client address client phone client...
12
2573
by: raghav | last post by:
Hi I am working on ASP.NET 2.0. I am developing a website using Wizard control. Based on number of steps added, next, previous, finish buttons generate automatically. After running the...
8
10802
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
7106
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
7181
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
7349
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
5442
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
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
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...

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.