How to "pull" an existing pdf into the app? [duplicate] - c#

This question already has answers here:
Display a PDF in WPF Application [closed]
(9 answers)
Closed 3 years ago.
I currently have an app in C#/WPF, and I have a manual on how to use it in pdf, and I'm thinking of adding a button that when clicked open the manual ... How can I do this?

Process.Start("C:\Temp\yourname.pdf");
replace the string "C:\Temp\yourname.pdf" with the path and filename for the pdf file you want to open.
This will cause the pdf to open in your systems default pdf application.
You will need: - using System.Diagnostics;

Related

Opening A File With Code [duplicate]

This question already has answers here:
Open file with associated application
(3 answers)
Closed 5 years ago.
I have a string of the file path and I want to open the file. Not in the way that it shows bytes in the console for example, but to open the original file with the program that suits him.
For example if my path shows a .docs file I want it to be opened with Word.
Any suggestions?
System.Diagnostics.Process.Start("CMD.exe",filePath);

How can I establish my windows form application (c#) as the principle application to open a file extension? [duplicate]

This question already has answers here:
Windows file associations done properly?
(1 answer)
How to associate a file extension to the current executable in C#
(9 answers)
Closed 6 years ago.
I have a windows form application made in c#, and I want to set a file extension (.txt for example) to open automactily with my application and my icon instead of the NotePad. How can I do it?

How to make file to be opened by my app? [duplicate]

This question already has answers here:
Where does Windows store its "Open With" settings?
(3 answers)
Closed 9 years ago.
I have a little bit confusing problem. I'm not a beginner but I don't know how to do it..
For example I've written a program like notepad from which you can open files, save and etc. But when I set any custom format like ".blabla" to be opened by my app it is not working, so how can I make it to be opened by my app?
It is in WinForms
You need an entry in the registry for custom file extensions. You can try inserting a key in the registry as follows:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\

C# class similar to Java Desktop class [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Open file with associated application
I want to open a file in it respective application, e.g. open function of windows.
Same thing can be done in java with the help of Desktop class where you pass the file name and the respective file is opened.
But no idea how to do in C#.
System.Diagnostics.Process.Start("filename.doc");

How to view which files is Writing a Process [duplicate]

This question already has answers here:
How do I get the list of open file handles by process in C#?
(7 answers)
Closed 7 years ago.
Is there a way to get List of Files or FileName which a Process is writing (if possible writing/reading/appending) ,from C# ,which means im talking about Windows (NT,Vista,XP,7).
see here: How do I get the list of open file handles by process in C#?

Categories