Jump to content
Sign in to follow this  

Using the desktop as a one-layer window

Recommended Posts

Posted Image

As an analogy, I wish to retrieve the colour of the top-left part (co-ordinates (0,0)) of a graphic in the Paint Shop Pro application, in this case a faded red>black box, and then select the same colour from MSPaint and "paint in" that colour onto the MSPaint blank canvas for the first pixel... Followed by going back to Paint Shop Pro to retrieve the colour of the next pixel (0,1), then going back to MSPaint to select that colour and paint it in, etc., etc, until you end up with the same graphic in MSPaint as you do in Paint Shop Pro. (Ignore the discrepancy of the amount of colours between the two for the time being, it's just an analogy).

Do you have to keep using the WinActivate and WinWaitActive functions every single time you wish to either grab the colour of a pixel (using PixelGetColor) from the source graphic in Paint Shop Pro, and also when you want to paint in the pixel in MSPaint?

I think repeatedly using WinActivate and WinWaitActive twice per cycle (once when reading the pixel colour data from the source, and a second time when writing the pixel colour to MSPaint) slows down the routine by a large margin, so I wondered if you have both applications open and semi-minimised and not overlapping each other (as shown in the screengrab above), and keeping the MSPaint window as the only active window, if there was some way of being able to read the pixel colour data from the Paint Shop Pro window without having to activate it first, seeing as it is still visible (not obscured)?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...