I am busy writing a program in Visual Basic .NET and I have a few questions regarding best practices. I know it is a bit open ended, but just a few guidelines/ideas or even links would be appreciated.
Firstly, the code in the main form is getting a bit long (about 1000 lines). What is an acceptable number of lines of code for the main form or any other form for that matter? I have divided the program into classes as far is it makes logically sense to me. What are some good guidelines to what should be added together in a class? Should I add functions in classes as shared function rather than putting the code in the main form? Also, should I refrain from adding code in modules?
On a similar note, I am looking for information about how to design a large software project. I know the language pretty well now, but how does one actually plan how to create a large program or does that only come with experience?
It sounds like you are not creating distinct layers in your application. If your main form has 1,000 lines of code, you are probably putting business logic or even data access code in the form itself. You really need to separate out your layers (at least presentation layer, business logic layer, and data access layer). This will help you better follow good OO principles. In relation to VB.NET specifically, here are a few articles that might help:
http://www.asp.net/data-access/tutorials/creating-a-business-logic-layer-vb
http://www.vbdotnetheaven.com/UploadFile/akrao/PracticesofCodingInVB11162005001109AM/PracticesofCodingInVB.aspx
http://www.codeproject.com/KB/vb/N-Tier_Application_VB.aspx
These will help you with layers and how to implement them in VB.NET. The ASP.NET article will work fine because the actual ASP.NET is the Presentation Layer, which you would replace with Winforms.
If you want to watch videos on OO design principles, here is a good site to do so (it isn’t free but it is very cheap):
http://www.learnvisualstudio.net/content/series/Visual_Basic_201_Object_Oriented_Programming_and_Design_Patterns.aspx
A great book for helping you understand OO design is Head First Object-Oriented Analysis & Design.