Library tutorials & articles

Windows Forms and Controls

Compiling the project

I’m now going to compile this on the command line. Paste the complete code into notepad and save it in it’s own directory. Now create a .bat file in the same directory and paste this into it:-

%windir%\Microsoft.NET\Framework\v1.0.3705\vbc.exe
/target:winexe /out:frmMain.exe /r:system.dll,system.drawing.dll,system.windows.forms.dll frmMain.vb


O.k. what the hell is this I hear you cry. Well this is a call to the VB.Net compiler vbc.exe using the generic %windir% to get your windows directory. Note you should check you are using v1.0.3705 of the framework otherwise the directory may be different and may not even work. I then specify with switches what I want. I want it to create a Windows Executable - /target:winexe, to create an exe called frmMain.exe - /out:frmMain.exe, I’m referencing various .dlls using the /r which can also be /reference and finally the file to compile is frmMain.vb.

Run this batch file and it should create frmMain.exe in the same directory. Run that exe and it should be exactly the same as what you created in VS.Net. VS.Net Is referred to as an IDE. That is it is an aid to creating .Net applications and as such is not an absolute requirement to do so.

O.k. I hope this helped, I hope it didn’t confuse and if it didn’t work then let me know and I’ll see if I can sort out where you’re going wrong. I’ve been a long time VB/Asp Developer and I have to admit I’m very excited about .Net. It’ll take some time to get a grasp of everything you can do with it but I think it’ll be well worth it.
Happy Programming.

Comments

  1. 01 Aug 2008 at 19:22

     Only 5 years after the last post eh :) Anyway because things may have changed I recommend you look at the microsoft docs on this - http://msdn.microsoft.com/en-us/library/ms229597(VS.80).aspx

  2. 22 Oct 2003 at 16:26

    It may not work with mdi children.

  3. 11 Jul 2003 at 03:26

    I use VB.Net (framework 1.0.3705) on Windows 2000, and I noticed the 'MinimumSize' property doesn't seem to have any effect on my forms (MDIChildren). Does that property really prevent users from resizing a form to a smaller size than the MinimumSize? Any other experiences?


    Thank you,

  4. 01 Jan 1999 at 00:00

    This thread is for discussions of Windows Forms and Controls.

Leave a comment

Sign in or Join us (it's free).

Brian O'Connell Microsoft Certified Applications Developer with 10 years experience developing web based applications using asp, asp.net for a Local Authority in Dublin. Clings to a firm belief that a web applicat...

Related podcasts

  • xpert to Expert: Inside Concurrent Basic (CB)

    "Concurrent Basic extends Visual Basic with stylish asynchronous concurrency constructs derived from the join calculus. Our design advances earlier MSRC work on Polyphonic C#, Comega and the Joins Library. Unlike its C# based predecessors, CB adopts a simple event-like syntax familiar to VB progr...

We'd love to hear what you think! Submit ideas or give us feedback