I need to programmically open a file by an application.
Let's say the file's path is stored in a variable named My_File_Path.

1. How can my program open a file by the application that is associated with it?

If the extension txt has been already associated with Notepad, and you double-click on a text file in Windows explorer, that file is opened in Notepad.
Now, if the logic of my program is such that it needs to open a file, how can I program it to open that file by the application that is associated with it?

2. Also, in Windows explorer, you can right-click on a file and choose "open with" and in that case, it provides you with a list of all the applications that can open that file.
How can I programmically do this one as well?

Thanks.