Home All Groups Group Topic Archive Search About
Author
17 Jul 2006 10:17 PM
Daniel N
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

Author
17 Jul 2006 11:30 PM
GhostInAK
Hello Daniel,

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

-Boo

Show quoteHide quote
> 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
>
Author
17 Jul 2006 11:47 PM
Daniel N
So how can I inherit subs and declarations into another vb file in 2003

Show quoteHide quote
"GhostInAK" <ghosti***@gmail.com> wrote in message
news:be1391bff12a8c877cd192061d9@news.microsoft.com...
> 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
>>
>
>
Author
18 Jul 2006 4:46 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Daniel N" <saintdark_***@yahoo.com> schreef in bericht
news:t1Uug.659$mQ.582@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
>
Author
18 Jul 2006 12:52 PM
Izzy
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:
Show quoteHide quote
> 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
Author
18 Jul 2006 11:04 PM
Daniel N
Thanks Izzy, this is EXACTLY what I was looking for.


Show quoteHide quote
"Izzy" <israel.rich***@gmail.com> wrote in message
news:1153227168.440997.160180@p79g2000cwp.googlegroups.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
>