You can use code similar to that one to add file association in the registry:
Add file association to Basic4ppc source code files (on the device)
Your program will receive the tapped file name as the first argument - args(0).
You can check in App_Start:
Code:
If args.Count > 0 then
... 'Load tapped file
End If