Can I turn off using swap for single program? Visual Studio for example. Or set high priority of using memory by this program?
Here is an Visual Studio addin which does what you want:
Forced load Visual Studio 2010 in physical memory from the paging file
You can call the SetProcessWorkingSetSize function in the win32 API which might achive what you want?