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

Organize Code

I am new to .net and want to organize my code better. I am writing in vb.net
2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code (So I
can orginize it in 2 or 3 .vb files).

When I create a new class I can;

Inherits Project.MainForm
Jul 17 '06 #1
5 2589
Hello Daniel,

Not in 03. In 05 you can do this with partial classes.

-Boo
I am new to .net and want to organize my code better. I am writing in
vb.net
2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code
(So I
can orginize it in 2 or 3 .vb files).
When I create a new class I can;

Inherits Project.MainForm

Jul 17 '06 #2
So how can I inherit subs and declarations into another vb file in 2003

"GhostInAK" <gh*******@gmail.comwrote in message
news:be*************************@news.microsoft.co m...
Hello Daniel,

Not in 03. In 05 you can do this with partial classes.

-Boo
>I am new to .net and want to organize my code better. I am writing in
vb.net
2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code
(So I
can orginize it in 2 or 3 .vb files).
When I create a new class I can;

Inherits Project.MainForm


Jul 17 '06 #3
Daniel,

Why are you throwing repeated messages in these newsgroups.

I have seen a bunch of answers on your question at least in this newsgroup,
where you are telling the same as now. The answers were all quiet different
but a direct answer on your question.

Cor

"Daniel N" <sa***********@yahoo.comschreef in bericht
news:t1**************@fe12.lga...
>I am new to .net and want to organize my code better. I am writing in
vb.net 2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code (So I
can orginize it in 2 or 3 .vb files).

When I create a new class I can;

Inherits Project.MainForm

Jul 18 '06 #4
You can use: # Region " Name "
To group code and make it easier to read. I group my code based on the
codes function.

Also you mentioned your new to vb.net, that might also be a reason your
main form's code is 50 or 60 pages. Look through your code and try to
write reusable code.
Daniel N wrote:
I am new to .net and want to organize my code better. I am writing in vb.net
2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code (So I
can orginize it in 2 or 3 .vb files).

When I create a new class I can;

Inherits Project.MainForm
Jul 18 '06 #5
Thanks Izzy, this is EXACTLY what I was looking for.
"Izzy" <is************@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
You can use: # Region " Name "
To group code and make it easier to read. I group my code based on the
codes function.

Also you mentioned your new to vb.net, that might also be a reason your
main form's code is 50 or 60 pages. Look through your code and try to
write reusable code.
Daniel N wrote:
>I am new to .net and want to organize my code better. I am writing in
vb.net
2003
and the code for my main form is nearing 50-60 pages and would like to
create another file like a class, module or code file that SHARE sub
procedures, and declarations as if it were with the rest of the code (So
I
can orginize it in 2 or 3 .vb files).

When I create a new class I can;

Inherits Project.MainForm

Jul 18 '06 #6

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

Similar topics

10
by: Bruce W...1 | last post by:
I've been learning about PHP for a couple of weeks. With includes, PHP scripts, and HTML I can see where a large and complex website could easily turn in to a big hairy mess with files all over...
1
by: Rudderius | last post by:
Hey, I'm working on a winform app in VS 2005. I'm wondering if someone knows some best practices on how to organize the toolstrips. I have a menuToolStrip and some other toolstrips. As in many...
1
by: ASP Developer | last post by:
I have a user control with exposed properties. I have about 100 properties. I would like to organize them so they are easier for other programmers to peruse. Is it possible to organize the misc...
4
by: Daniel N | last post by:
I am new to .net and want to organize my code better. I am writing in vb.net and the code for my main form is nearing 50-60 pages and would like to create another file like a class, module or code...
2
by: key9 | last post by:
Hi all look at the organize tree main.c ------ #include lib_adapter.c main() { foo();
6
by: Larry Bud | last post by:
Been working with .net 2 since January, and am in the middle of my first large project. It's becoming obvious that one must organize their code well in a large project to make maintenance...
1
by: Thomas Wittek | last post by:
Hi! Is there any possibility/tool to automatically organize the imports at the beginning of a module? I don't mean automatic imports like autoimp does as I like seeing where my...
0
by: Dudeja, Rajat | last post by:
Hi, I'm learning Python to write a GUI application using Tkinter & Tk. I've evaluated Eclipse and Pydev. With the help of Fabio Zadrozny I successfully installed Eclipse and PyDev. Thanks. ...
2
by: Fredrik Lundh | last post by:
Dudeja, Rajat wrote: A Python program consists of a script file (the py file you run to start the program), and usually one or more additional module files (py files that you import). The...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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?

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.