473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Changing the order of controls in "Windows Form Designer generated code"

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 project. But whenever I modify the form, VB rearranges the Windows
Form Designer code. I am growing weary of moving that particular block of
code each time I build my project.

Any ideas?

Mikey
Nov 20 '05 #1
2 1777
* "MadMikey" <ju**@mdrnetworks.com> scripsit:
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 project. But whenever I modify the form, VB rearranges the Windows
Form Designer code. I am growing weary of moving that particular block of
code each time I build my project.


You can add the control outside the designer generated code, for example
before the call to 'InitializeComponent'. Notice that this will maybe
break full compatibility with the designer.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Dont try to change the code in "Winform designer generated code" region.

1) Put your specific control loading code in the order you want it, in a new procedure
2) call that new proc from you InitializeComponent() OR call it before/after call to InitializeComponent()

HTH
Kalpesh

Nov 20 '05 #3

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

Similar topics

3
by: Pavils Jurjans | last post by:
Hello, I have bumped upon this problem: I do some client-side form processing with JavaScript, and for this I loop over all the forms in the document. In order to identify them, I read their...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
9
by: Dan | last post by:
I am trying to use Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "". I am not really sure why, this happens for all of my controls...
1
by: Robin Tucker | last post by:
Hi, I have a problem with my code (somewhere in the InitialiseComponent) preventing any of my controls being visible in form design mode, although everything is ok at runtime. No errors are...
1
by: QLD_AU | last post by:
I am having trouble when viewing the code behind a form, any events i do are shown, however the Windows Form Designer generated code Section is not shown, Does anyone know how to turn this on...
2
by: Richard Bysouth | last post by:
Hi When attempting to view inherited forms in design mode I have been getting the message "The path is not of a legal form" and am unable to view the designer. I can't seem to find any...
8
by: abcd | last post by:
I can get the value on the form at the server side by using Request.form("max") when max field is disabled I dont get value. For GUI and business logic purpose I have disabled some fields with...
6
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET...
2
by: Kuldeep | last post by:
Framework: Visual Studio 2005 Technology: ASP.NET 2.0 Language: C#.NET 2.0 Hi All, I have an in-built tool to generate PDF Reports. Once a PDF Report is generated, I have provided an option...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.