|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Organize CodeI 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 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 > 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 >> > > 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 > 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 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 >
GetFiles exception
Threading... Copy / Paste, Excel To flexgrid On error resume next bug Encrypt My.Settings setting? set up timer start 15 sec past minute lastLogonTimestamp group enumerators so intellisense shows them in VB6? Public Structure An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll |
|||||||||||||||||||||||