I made a program to take a screenshot of the screen. How can I save the image without prompting the user for imput?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
System.IO.File.WriteAllBytes(filePath, bytes)is what you are looking for. Give it a file path and some bytes, and it will write them to that file. Without seeing what image class you are working with, I can’t tell you how to extract the bytes from it.System.IO.File.WriteAllText(filePath, text)is also handy for writing text files if you need to do that.