Print Button

ad.txt

Member
Joined
Oct 4, 2022
Messages
17
Programming Experience
Beginner
Hi !
I'm completely new to C# so my question may be quite absurd. I have to add a print button on a Form.
My goal is that the user can just print a document by clicking on this button without having to browse in the computer.

I suppose I have to create a first code selecting the document from the computer and then a second one to print this document.
Is that right ?

I've tried many things and codes that I found on YouTube or on the internet but none of them have worked.

Do you have any idea of code that I can use to achieve my goal ?

I'm completely lost so any help would be amazing !

Thank you !! :)
 
C#:
info.WorkingDirectory = Application.StartupPath;
or
C#:
string FileToPrint = Path.Combine(Application.StartupPath, "copy_of_etiquette.xlsx");
 

Latest posts

Back
Top Bottom