How does VB get the color in the specified window in the background?

Updated on technology 2024-03-26
10 answers
  1. Anonymous users2024-02-07

    Amitabha. The old man is here. No problem for years ==+

    Note. The first argument to getpixel is not a window handle. Don't be mistaken.

    He is an HDC handle for a container. Container handle. It's not a window handle.

    You can't get the pixels of getpixel in the background. Coverage doesn't work.

    printwindow can. With a little flexibility, you can achieve background color picking. Overlays can also be colored.

    But there is also a condition. It can't be minimized.

    As for the usefulness of printwindow. That's pretty simple. Look at MSDN above. I'll state one for you.

    VB. declare function printwindow lib "user32" (byval hwnd as long, byval hdcblt as long, byval nflags as long) as long

    sdkbool printwindow(hwnd hwnd, window to copyhdc hdcblt, hdc to print intouint nflags optional flags estimate that the landlord is doing bad things. That's it. It's already detailed.

    The backend is the most perfect API function.

    Not coming. It turned out to be anonymous. == that does not give points

  2. Anonymous users2024-02-06

    Take a closer look at the printwindow function. There are many examples on the Internet. If you have any questions, you can discuss them and learn together.

    In addition, getpixel can get the color value of the blocked window, note that the first argument in the getpixel function in the example you said is the window handle, you can use the findwindow function to get the handle of the window you want to screenshot.

  3. Anonymous users2024-02-05

    No... To be in front and to be able to read.

  4. Anonymous users2024-02-04

    There is a way to get the color of the specified point in the background, but this method will do so if the specified window is covered by other windows.

  5. Anonymous users2024-02-03

    Set the autoredraw property of the form to true to pick up the color even if the form is blocked or minimized.

    You don't need an API function to get the color inside the form.

  6. Anonymous users2024-02-02

    clr=,y)

    If you block it, then there's no way.

  7. Anonymous users2024-02-01

    2. The program window is blocked by other windows, or hidden.

    This can be difficult to do.

    I used to write a program that got the color of the screen (the color of the screen is currently displayed), but it was not possible for the overwritten window.

  8. Anonymous users2024-01-31

    There is a function to get the color of a certain point: getpixel

    If the getpixel function is blocked, it will not be able to get the color in the window.

  9. Anonymous users2024-01-30

    The program window is blocked by other windows, or it is hidden, which may be difficult for Lu Xian. I used to write a program to get the color of the screen (the color that the screen is currently displaying), but it was not possible to get the covered window late shot.

  10. Anonymous users2024-01-29

    Don't understand what kind of window you are talking about in the background window.

    I still don't know, but there's a function to get the color of a certain point: getpixel depends on which window you're using HDC.

    Oh, maybe I'm wrong, I didn't try, I'm sorry.

Related questions
6 answers2024-03-26

I tried going downstairs with no problem. If it can't be opened, the landlord can try this sentence: (note that it is 3 quotation marks). >>>More

5 answers2024-03-26

The following methods are for reference.

Method 1: Use the sendkeys statement. >>>More

4 answers2024-03-26

dim xlbook as 'Workbooks.

dim xlsheet as 'Worksheet. >>>More

4 answers2024-03-26

Here's how to get Wealth Value:

Know the value of wealth: >>>More

4 answers2024-03-26

Hello. Know the value of wealth].

1 New users log in for the first time 20 Complete the activation of the account2 Be 20 Bounty Points The person who asked the question is, or is selected by voting, will receive the 20 Bounty Points set by the system automatically given by the system. >>>More