Hi...
file with extension vb(*.vb) can compile to exe using vb.net coding.
could everyone help me how to compile to exe using vb.net coding if use own extension(not *.vb) ?

thanx

Use command line compiler. This example is taken from the MSDN

To Compile File.vb and create File.exe
vbc /reference:Microsoft.VisualBasic.dll File.vb

Replace File.vb with, for example, test.foo.

You can read more about Visual Basic Compiler from MSDN.

thanx for your reply
How if I compile but not display dos form.
I compile always display 2 form,windows form n dos form.
can compile n execute just windows form?
thanx

Didn't quite get what you asked. I would use Shell Function to spawn a separate process and use a bat file.

Since bat-files are normal text files, you can create one easily in the code. Like vbc /reference:Microsoft.VisualBasic.dll MyFile.foo >message.txt and name the file, for example, compile.bat. The bat-file would compile MyFile.foo and output (error) messages to message.txt file from where you can check if the compilation succeeded.

Then in your code use Shell("compile.bat", AppWinStyle.MinimizedNoFocus, True, 10000) . With these arguments command window is minimized and your application waits until compilation is ready or times out after 10 seconds.

These are just suggestions how to do it. Play around a bit with bat-files and shell function. I believe you'll find a suitable way to use them in your application.

Is there any easier way to do this?

I have used Resource Hacker to extract all the files from an .exe so I could translate the menus right (translating in the program shows me wrong characters).

Thank you in advance.

The OP asked about compiling the source code.

Your question is related to compiling and/or manipulating resource files. Please, start a new thread for your question, thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.