Hi
Write Programming in Script:
1.Open infopath in design mode
2.Go to Tools Menu
3.Select Programming
There you will have different event.select any of the event, it will navigate to Microsoft Script Editor window.
Write Programming in Visual Studio2005:
1.Select Start->All Programs
2.Open Microsoft Visual Studio 2005
3.Go File->New->Project
Result:New Project window will open
4.Select the language in the New Project wizard say 'Visual C#'
5.Select 'Office'
6.Select 'Infopath Form Template' under Template in the right pane
7.Enter the name of the Project in the Name text box
8.Browse to the Location of the project
9.Click Ok
Result:Microsoft Office Project Wizard' will open
10.Select 'Create new form template' radio button
11.click Finish