473,385 Members | 1,942 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.

How to split a form when coding?

Hi,

The main form of my project is verbose. It contains 26,000 lines of code and
many controls. These controls are located in three different TabPages of a
TabControl.There are also other tabcontrols on the main tabcontrol.

Is it possible to split a form in coding and then looks like a full well
form to user when excuting?

Thanks in advance

Peter
Feb 14 '06 #1
4 1326
In VS 2005 you can use "Partial Classes" to logically seperate your code.
The IDE uses them to hide the form creation code.

Mike Ober.

"Peter" <zl*****@sina.com> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
Hi,

The main form of my project is verbose. It contains 26,000 lines of code and many controls. These controls are located in three different TabPages of a
TabControl.There are also other tabcontrols on the main tabcontrol.

Is it possible to split a form in coding and then looks like a full well
form to user when excuting?

Thanks in advance

Peter


Feb 14 '06 #2
Thank you, Michael.

Do you think it can also used in UI? e.g. I put some controls on form1,then
I put some other controls on form2. After coding,I want to see all the
controls in one form when excuting.

Peter
Feb 14 '06 #3
CMM
Kinda sorta... but it's not as cool as it could be. It's called Visual
Inheritance (if I remember correctly... nobody really uses it I don't
think).
In your form2 change "Inherits.System.Windows.Forms" (in the code-behind
hidden partial class if you're using VS2005) to "Inherits MyForm1"

Maybe they've improved this in VS2005. I doubt it.

Probably the best solution for your "separation" are UserControls.
UserControls are just containers. You can add a bunch of controls to them.
Then reuse them in as many forms as you want.

--
-C. Moya
www.cmoya.com
"Peter" <zl*****@sina.com> wrote in message
news:eL**************@TK2MSFTNGP14.phx.gbl...
Thank you, Michael.

Do you think it can also used in UI? e.g. I put some controls on
form1,then
I put some other controls on form2. After coding,I want to see all the
controls in one form when excuting.

Peter

Feb 14 '06 #4
Yes, one of my friend also suggested me to use UserControls.

Peter


Feb 15 '06 #5

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

Similar topics

19
by: David Logan | last post by:
We need an additional function in the String class. We need the ability to suppress empty fields, so that we can more effectively parse. Right now, multiple whitespace characters create multiple...
1
by: Don Hames | last post by:
I have a windows application that has a split container in the client area. In the left panel, I added controls via the designer in VS 2005. In the right panel, I want to dynamically create and...
11
by: pmarisole | last post by:
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset. Example: I have a...
3
by: Venkat | last post by:
Hi, Ours is a windows based application and I have to perform an action which takes much time (as it requires much CPU time) on a single pc. I want to split the action to more than two and I...
9
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but...
6
by: Bob Bedford | last post by:
Hi all, I've an XML file that takes more than the hosting time limit to be readed by a PHP script. What I'd like to do is split the large XML file (can be more than 30MB) in little parts and...
10
Megalog
by: Megalog | last post by:
Hello all! This is my first posting here, although I've been lurking here for months and getting lots of help & tips from the past posts here. I'm in the process of updating our company's Access...
1
by: mad.scientist.jr | last post by:
I am working in C# ASP.NET framework 1.1 and for some reason Regex.Split isn't working as expected. When trying to split a string, Split is returning an array with the entire string in element ...
13
by: geosmy | last post by:
Hi everyone, First post here! I have been trying to upgrade to Acc2007 looking forward to using Split Forms. To my horror I have just discovered that Split Forms do not hold variables at...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.