Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How can I make a windows Form application which can run on both 64 bit and 32 bit system.
Till now I used a Windows form application made in 32 bit system to run on 64 bit by creating a x86 file. But I want to know that what can be done to make that application to run on any system either 32 bit or 64 bit.
Posted
Comments
Richard MacCutchan 21-Jan-14 13:23pm    
It must be an x86 application, since a 64 bit program will not run on 32 bit architecture.

Keep in mind that you cannot mix 32- adn 64-bit code in the same process. This means that if you're using external controls and libraries that are 32-bit only, your application must also be 32-bit only.
 
Share this answer
 
A 32-bit application will perfectly run on a 64-bit machine, so you actually don't really need to change something. If you really want that the application runs as a 64-bit appliction on a 64-bit machine, then follow these steps:

  1. In Visual Studio, go to Properties->Build
  2. Select "Any CPU" for "Platform target"
 
Share this answer
 
sir as per my experience Any CPU doesn't work in all pc's. Instead use it like this :-

In Visual Studio, go to Properties->Select X86 Platform target.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900