VSTA (Microsoft Visual Studio Tools for Applications) for Infopath can be installed by selecting the ‘Visual Studio Tools for Applications’ option during the installation of Microsoft Office 2007. No separate installation is available.
you can reinstall VSTS for InfoPath by,
Control Panel -> Add or Remove Programs ->Microsoft Office 2007 (Click Change button).
Follow the wizard and you will see dialog as shown below,
Select the VSTA and install.
Now you will be able to code (C# or VB.Net) for InfoPath form you have designed.