Screenshot using C programming | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Screenshot using C programming

I wants to take screenshot of my screen in Windows and Linux using C programming, but I'm unable to find any program for that. Their are many C++ programs but even they are not working for me. I wants to take screenshot using C and save it in file. Please help me Which library or module I can use ?? And how to do that with that library ??

14th Mar 2021, 8:58 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
4 Answers
+ 2
Both windows and linux (ubuntu for sure) come with a snipping tool. used to capture screen shots or even specific parts of the screen. no point in making that other than for fun/experience. https://support.microsoft.com/en-us/windows/use-snipping-tool-to-capture-screenshots-00246869-1843-655f-f220-97299b865f6b https://www.tecmint.com/take-or-capture-desktop-screenshots-in-ubuntu-linux/
14th Mar 2021, 10:15 PM
Slick
Slick - avatar
0
Slick Martin Taylor If I use snipping tool or prt + scr then how I'm supposed to save it at specific location ?? I want to automate process And I want to use C. I can make python program to take screenshot and send it argument of location to store shot. With python, I will have more control then any snipping tool. I want to use C. Does their is not any way to do that in C ?? And if their is no way then how python has a way ???
15th Mar 2021, 4:40 AM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
0
Slick Yes, their is point making my own program. I will make a program which should have this function.
15th Mar 2021, 4:45 AM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
0
Martin Taylor Thanks I'm able to take screenshot using gdi library
16th Mar 2021, 8:39 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar