Get Pixel from running program not saved image, and mouse control

I have been trying to make a program that can get the pixel from an application without having to save a snapshot then get pixel from image... can this be done and how? Also need to know the commands to make the mouse click and keyboard react to different items on screen... any help on this would be greatly appreciated

Thnx Crazyscorpio

Comments

  • Hi,

    [code]
    Public Sub GetPixel_Example(ByVal e As PaintEventArgs)

    ' Create a Bitmap object from an image file.
    Dim myBitmap As New Bitmap("Grapes.jpg")

    ' Get the color of a pixel within myBitmap.
    Dim pixelColor As Color = myBitmap.GetPixel(50, 50)

    ' Fill a rectangle with pixelColor.
    Dim pixelBrush As New SolidBrush(pixelColor)
    e.Graphics.FillRectangle(pixelBrush, 0, 0, 100, 100)
    End Sub
    [/code]


    Regards,

    Dr M.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion