hess
asked on
Pixel Color and MDI workspace color
How can I get the color of the bottom most right most pixel of an mdi forms picture (i.e. MDIform1.picture) and set the back ground property of the mdi form to that color.
I don't want to use any extra picture box controls if i dont have to.
I don't want to use any extra picture box controls if i dont have to.
fbtCell - one problem with that answer : there is no hdc property of an MDI form's picture.
I tried on an MDI form.
Make sure that MDIform1.HasDC = True and then call :
color = GetPixel(MDIform1.hDC, x, y)
(i just belived that MDIform1.picture was a PictureBox, and PictureBox used to have one hdc).
Make sure that MDIform1.HasDC = True and then call :
color = GetPixel(MDIform1.hDC, x, y)
(i just belived that MDIform1.picture was a PictureBox, and PictureBox used to have one hdc).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry, Eric37 Has the answer i'm looking for.
ASKER
This was great and did exactly what i needed
color = GetPixel(MDIform1.picture.
where x and y stand for the right (and top or left) most coordinates.
And then set the back ground property of the mdi form :
MDIform1.BackColor = color