Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9082641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:36:25+00:00 2026-06-16T20:36:25+00:00

Possible Duplicate: How to get screenshot to include the invoking window (on XP) I’m

  • 0

Possible Duplicate:
How to get screenshot to include the invoking window (on XP)

I’m currently using CopyFromScreen(0, 0, 0, 0, imageSize) to capture the desktop but unfortunately, there is a particular winform’s contents which it didn’t capture (the rest are alright).

This winform’s job is pretty simple; it’s just a ticker program. Black background and a label that’s moving per millisecond or so, that’s all. No borders.

I can’t use directx’s CaptureScreen (I’ve tried) because the graphic card’s driver doesn’t allow me to access the front buffer (there’s nothing in the back buffer). I can’t use SendKey({PRTSC}) either because I can’t overwrite the clipboard’s content.

What’s interesting however, is that by pressing the keyboard’s “Print Screen” and pasting it in MS Paint, the ticker program was captured perfectly. It just didn’t work via CopyFromScreen in the code. How do I get it working, or is there any other workaround for this without resorting to win32 APIs?

EDIT:

I have discovered why didn’t it work.

It turns out that my ticker program’s form had TransparentKey set to anything other than null (maroon in this case). When TransparentKey is not null, CopyFromScreen will not work. It just copies a blank image.

Does anyone knows how to get both (TransparentKey and CopyFromScreen) working together? lol

EDIT 2 (SOLVED):

As posted below, I have discovered that CopyFromScreen is actually a wrapper around BitBlt. Instead of calling CopyFromScreen, I used the BitBlt call here:

How can I save a screenshot directly to a file in Windows?

However, I modified the code a little. Change the call to:

WIN32_API.BitBlt(hMemDC, 0, 0,size.cx,size.cy, hDC, 0, 0, WIN32_API.SRCCOPY | WIN32_API.CAPTUREBLT);

And add this to WIN32_API class:

public const int CAPTUREBLT = 1073741824 

And now it’s possible to capture desktop with TransparentKey.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:36:26+00:00Added an answer on June 16, 2026 at 8:36 pm

    Capture the Screen into a Bitmap
    or
    http://www.csharphelp.com/2006/11/capturing-the-screen-image-using-c/ might be of help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Programmatically get screenshot of page I am working on a small desktop
Possible Duplicate: Get the resolution of a jpeg image using C# and the .NET
Possible Duplicate: Get the IP Address of local computer Obtaining local IP address using
Possible Duplicate: get name of current PHP script in include file Can an included
Possible Duplicate: Get hex value rather than RGB value using jQuery I've got a
Possible Duplicate: Get connecting IP from specified ports that using by other program. If
Possible Duplicate: Get content within a html tag using php and replace it after
Possible Duplicate: Get path of executable I'm programming on Windows using MinGW, gcc 4.4.3.
Possible Duplicate: Get Client IP using just Javascript? I know PhP can know your
Possible Duplicate: Get list of all input objects using JavaScript, without accessing a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.