473,769 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ 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.Componen tModel.IContain er' in this class.

on the line:
"Private components As System.Componen tModel.IContain er"
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 1691

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.Desi gner.VB file that looks like the code that is
missing in the main (.vb) file. Here is the code:

<Global.Microso ft.VisualBasic. CompilerService s.DesignerGener ated()> _

Partial Class frmRemarks

Inherits System.Windows. Forms.Form

'Form overrides dispose to clean up the component list.

<System.Diagnos tics.DebuggerNo nUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing AndAlso components IsNot Nothing Then

components.Disp ose()

End If

MyBase.Dispose( disposing)

End Sub

'Required by the Windows Form Designer

Private components As System.Componen tModel.IContain er

'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.Diagnos tics.DebuggerSt epThrough()> _

Private Sub InitializeCompo nent()

Me.SuspendLayou t()

''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.Componen tModel.IContain er' in this class.

on the line:
"Private components As System.Componen tModel.IContain er"
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 InitializeCompo nent().

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 InitializeCompo nent() 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
5036
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 over to .NET or can this form be rebuilt in a .NET editor retaining the same look? OR????? RICK
25
10264
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
2
1901
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 only works for the first record I enter. The same goes for deleting a record. It says I can't access the records, and that goes for both making or deleting. I'd appreciate your help very much, uv
4
3174
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. Tables: (abbreviated) TblDivision DivisionID
4
1993
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 DataAdapters and create DataSets bound to them so everything is strongly typed - a very nice feature. Why in the world can this not be done the same way for ANY type of application (say, Console, or Class Library). What do these features have...
6
6000
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. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vburfdataformwizard.asp However no matter how hard I look I can't locate it. Any ideas what is wrong or is the documentation in error and this feature has been removed from VS.NET 2005
8
24528
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 email
12
2601
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 application, these button work automatically, means we can go to next step, previous step by clicking on corresponding buttons. In my application I have 3 steps. On Next button click of step 1, I want two things to happen. One is inserting data of step 1 in...
8
10839
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 steps successfully with the following code... Control myContainer = (Control)Wizard1.FindControl("SideBarContainer"); DataList mySideBarList = (DataList)myContainer.FindControl("SideBarList");
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
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
9998
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
9865
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...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
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
5310
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
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.