Thursday, October 21, 2010

How to create a VB application to run on other computer without taking all the forms along.?

i want to create an application in VB to run on other computers but dont want to carry all the forms. is it possible to create a .exe file with VB so that the application can be independently used?

if yes, how?How to create a VB application to run on other computer without taking all the forms along.?
You don't need the forms (they become part of the exe) but you do need the ocx and dll files. VB doesn't create standalone exe files. You'll need a different language (or a different variant of a GUI BASIC) for that.



(Just running the exe file on a computer that doesn't have the other necessary files will only result in an untrappable runtime error.)How to create a VB application to run on other computer without taking all the forms along.?
There's supposed to be a ';makefile'; way to do it and I couldn't find that, however, I was able to find this out:

Visual Studio creates an EXE file everytime you test it.

Add these:

';Imports System

Imports System.IO';

to the beginning of your file,

then run this code:

';Dim path As String = Directory.GetCurrentDirectory()

MsgBox(path)';

And that will show you where to go to grab that Exe file.
Sure, just create a VB Console applications. No forms required. It is one of the Project types in visual studio.

No comments:

Post a Comment