1.2. Create a Windows-Based Application from the Command Line


You need to use the VB .NET command-line compiler to build an application that provides a Windows Forms-based GUI.


Create a class that inherits from the System.Windows.Forms.Form class. (This will be your application's main form.) In one of your classes, ensure you implement a Shared method named Main. In the Main method, create an instance of your main form class and pass it to the Shared method Run of the System.Windows.Forms.Application class. Build your application using the command-line VB .NET compiler, and specify the /target:winexe compiler switch.

How It Works

Building an application that provides a simple Windows GUI is a world away from developing a full-fledged ...

Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.