Requirements for running a Winforms app
I'm an ASP.NET developer that has never done Winforms/WPF, but I need to create a calculator application that needs to run on ANY Windows platform since Winows XP.
The app will go out to a number开发者_如何学编程 of people and we have no idea what version of Windows they're running.
So my question is, what technology should I use to ensure that everyone can run the app without installing 3rd party software? And is there any way of creating the app that I don't have to rely on .NET framework being installed?
I'd like to run the app as a single .exe file that we can put on a USB stick.
Any help appreciated
Marko
If you want extra lean and maximum compatibility with legacy Windows versions, write against the Windows API app using C++. It will be extremely time consuming compared to .NET, but it will run on any 32 bit Windows platform, and the binary will be very small.
For something less extreme, but still very lean and very compatible by modern standards you can use C++ with the MFC library and link it statically (no DLL). Visual studio does support drag 'n drop screen design for dialog screens in MFC, so if you're willing to use dialogs you can have a rough approximation of productivity.
If you don't know C++, you should stay away from these first 2 solutions. I agree with Craig that Delphi is another excellent way to go, it creates stand-alone exe files that are small by modern standards.
VB6 is an attractive alternative because the runtime was included as a standard component on Windows releases since before XP was released. VB6 exe files are extremely small, smaller than MFC or even API apps in many cases. If you've used VB.Net, the syntax will be familiar and you should be able to get through creating a simple app without much problem.
Finally, you might consider targeting .NET 2.0 with C#. Statistically speaking it is rare for an XP or later Windows machine to lack .NET 2.0 at this point.
I think you would probably be best doing it in Delphi. It could create just a single EXE which can be deployed on a USB and run with no real dependencies.
精彩评论