473,549 Members | 3,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Editing Windows Form Designer generated code

OK, I know your're not supposed to do this. But it would be very handy
to be able to edit Windows Form Designer generated code when
generating lots of similar objects. In Visual Studio 2005, I
duplicated several ToolStripMenuIt ems by editing code. This entails
adding code in several places. I can build the project ok but the
[Design] window doesn't show the new objects that I created in the
code window. Does anybody know how to make this work?

JG

Feb 24 '06 #1
1 1447
Are you sure you're adding the control to the forms Controls collection?
Usually this is the last step in the InitializeCompo nent() function.

"Jon Gabel" <jo******@rcn.c om> wrote in message
news:O$******** *****@tk2msftng p13.phx.gbl...
OK, I know your're not supposed to do this. But it would be very handy
to be able to edit Windows Form Designer generated code when
generating lots of similar objects. In Visual Studio 2005, I
duplicated several ToolStripMenuIt ems by editing code. This entails
adding code in several places. I can build the project ok but the
[Design] window doesn't show the new objects that I created in the
code window. Does anybody know how to make this work?

JG

Feb 24 '06 #2

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

Similar topics

6
2536
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...
1
1979
by: AndrewDucker | last post by:
I've just started working with some people that have an odd setup and I'm wondering if someone can point out a better way of doing things (or what I'm doing wrong). They have a base form class, derived from the standard Form, but with the ability to show a list of panels in order. Each of these panels is a subclass of a subclass of Panel....
0
3479
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the full code for the test below. Create a project drop in the code and...
2
1786
by: MadMikey | last post by:
Can I change the order that controls are defined, or built, in the "Windows Form Designer generated code" section? I'm using VB.NET 2003. I have a custom control, that due to licensing restrictions, it must be defined before another "container" control on my form. I can manually move the code to where I need it, and successfully build my...
4
3135
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...
12
1768
by: Art | last post by:
Hi, I need help -- again -- I have a DataGrid with a DataTable as its source. It displays wonderfully when I put in some test data (withinin the code). Now, I'd like to change one of the values in the Grid, and have the DataTable change. I've tried using a Validating (and Validated) event to display the changed data. It doesn't...
5
4268
by: Fredrik Melin | last post by:
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
13
5229
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer.
13
1354
by: active | last post by:
With VS2005 the windows form designer uses the files *.Designer.vb I hope no one at MS is reading this because I know it will upset them to know - I like the old way better! I've been looking at the Options available for the Windows Form Designer and do not see one that would give me the older method. Is there such an option?
0
7446
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...
0
7956
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...
1
7470
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...
0
7809
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...
1
5368
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...
0
5088
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...
0
3498
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...
1
1936
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 we have to send another system
0
763
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...

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.