Find Jobs
Hire Freelancers

Capture screenshot Google Chrome window

$10-30 USD

Cancelled
Posted about 9 years ago

$10-30 USD

Paid on delivery
As all you know, PrintWindow api give us a black image when us want a capture screenshot of Google Chrome window. So, a friend said me that a possible solution for this problem is: Reduce Google Chrome window for -1px in both sides and after this, reset to original size. And so, will repaint again. Based on code below, someone could help me make this? sincerely I don't know where begin. ================================================================== [DllImport("[login to view URL]", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("[login to view URL]", SetLastError = true)] static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); [DllImport("[login to view URL]")] private static extern IntPtr GetDC(IntPtr WindowHandle); [DllImport("[login to view URL]")] private static extern void ReleaseDC(IntPtr WindowHandle, IntPtr DC); [DllImport("[login to view URL]")] private static extern IntPtr GetWindowRect(IntPtr WindowHandle, ref Rect rect); [DllImport("[login to view URL]", SetLastError = true)] [return: MarshalAs([login to view URL])] static extern bool PrintWindow(IntPtr hwnd, IntPtr hDC, uint nFlags); [StructLayout([login to view URL])] private struct Rect { public int Left; public int Top; public int Right; public int Bottom; } public static Bitmap Capture(IntPtr handle) { Rect rect = new Rect(); GetWindowRect(handle, ref rect); Bitmap Bmp = new Bitmap([login to view URL] - [login to view URL], [login to view URL] - [login to view URL]); Graphics memoryGraphics = [login to view URL](Bmp); IntPtr dc = [login to view URL](); bool success = PrintWindow(handle, dc, 0); [login to view URL](dc); return Bmp; } private void button1_Click(object sender, EventArgs e) { IntPtr WindowHandle = FindWindowEx([login to view URL], [login to view URL], "Chrome_WidgetWin_1", null); Bitmap BMP = Capture(WindowHandle); [login to view URL]("C:\\[login to view URL]"); [login to view URL](); }
Project ID: 7564838

About the project

3 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $26 USD for this job
User Avatar
Hello, I'm an expert C# developer with 10 years of experience. I've read and understood your requirements. I've already made the changes to the code and it's working. Please contact me.
$24 USD in 1 day
5.0 (51 reviews)
5.8
5.8
User Avatar
A proposal has not yet been provided
$25 USD in 1 day
4.9 (14 reviews)
3.9
3.9
User Avatar
A proposal has not yet been provided
$30 USD in 1 day
5.0 (8 reviews)
2.8
2.8
User Avatar
Hello, sir. I read your job posting with interest. I am very interested in your job. I am a excellent software developer and have rich experiences in c/c++ for 10+ years. I can help you complete your job perfectly in short time. I want to discuss in more details about this job. Looking forward your reply. Thank you. Best regards.
$100 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
i hope you wait until i send my proposal because i did not want to do the work this way and i did not worked with this api but if you only want to capture the screen from a application there may be easier ways to do that
$25 USD in 1 day
5.0 (1 review)
0.0
0.0

About the client

Flag of BRAZIL
bruklin, Brazil
5.0
3
Payment method verified
Member since Aug 3, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.