Hi -
I'm a little confused, since you mention VSTA and then also mention Visual Studio.
InfoPath support has changed in Visual Studio 2010, so if your form is a Visual Studio 2005 project, you won't be able to open it with Visual Studio 2010. You can learn more here.
If, instead, you do mean VSTA, I'm not sure why Visual Studio would be opening for you rather than the version of VSTA for your office install.