views:

616

answers:

5
+1  Q: 

Form to Exe

Hi

What is the easiest way to convert a simple form into an exe file?

I have an offline paper based form. I need to convert it into a software that people can use on their computers to fill and submit information. Since the form (it is a tax return) requires considerable time in filling, it is not convenient to have it online. I would much rather have a simple exe which gathers information, applies validation rules and then uploads a structured data file (like an XML file) containing the filled info.

Thanks

+1  A: 

What do you mean, exactly? When you build a project containing a form, it will already build an executable if the project type is "Windows Forms Application".

If you've got one project with several forms and you need one executable per form, you should split your project out - one project per form. (You could make the code display a different form based on executable name - or have several entry points and build the same code with different /main flags, but that would be pretty nasty.)

Jon Skeet
A: 

True, you get an exe during compile of a Windows.Forms application, only check the bin folder of the project.

You can check the output in Project/Properties/Application/Output type in Visual Studio.

This is a little bit offtopic: you cound create to a native image, with NGen (a Microsoft Utility), with some limitations. This means that the code will be compiled to a native image, placed to the cache directly and run from there, without using the JIT every time. This can improve performance, but it is not a real native exe, as Jon pointed out.

Biri
NGen doesn't produce a real "native" exe in that you still need .NET to be installed, etc. It just does the JITting of your code up front.
Jon Skeet
You are right, I corrected to "native image", and made some more comments about it.
Biri
A: 

I mean that I have an offline paper based form. I need to convert it into a software that people can use on their computers to fill and submit information. Since the form (it is a tax return) requires considerable time in filling, it is not convenient to have it online only. I would much rather have a simple exe which gathers information, applies validation rules and then uploads a structured data file (like an XML file) containing the filled info.

Vinayak
When you provide more information you should add it to the question, not write it as an answer.
Dour High Arch
noted. for the next time onwards
Vinayak
+1  A: 

Why must you have a .exe? Acrobat can create PDF forms that can be filled out and queried offline. If your users are online, why not create a web front-end that users fill out and which submits the data directly to your database or whatever? There is no need to create executables, download or upload anything.

Dour High Arch
I read somewhere that PDF forms have a limit of 100 users whose responses can be stored. Also the forms do not work in all PDF readers - for example in the lightweight Foxit PDF Reader that I use.I need to provide offline forms because the form is pretty long and a user needs time to fill it.
Vinayak
You would not distribute the same file to multiple users, each person would fill out their own copy. It is true most PDF readers do not support forms, users would have to use Acrobat but it is free.
Dour High Arch
+1  A: 

There are many Windows programs that can take paper forms and convert them to electronic forms people can fill out, including Acrobat, Form Pilot, and OmniForm.

OmniForm may be good for you, as it allows things like calculated fields, and can output the data in structured formats like XML.

Dour High Arch