• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Unable to get pixel from the hidden picture box

Hi,
  I need to get pixel from the picture box that visible property is set to false. I can get the pixels from that when the visible property is set to true. Any help be appreciated. Thanks!
0
Murugan
Asked:
Murugan
1 Solution
 
MuruganAuthor Commented:
thanks
0
 
OtanaCommented:
Do you use API Calls?
0
 
TimCotteeCommented:
That is the way it is unfortunately. When the picture box is not visible you cannot obtain the value for Picture.Point(x,y)

Instead of making the picturebox invisible, why don't you simply move it off-screen

Picture.Move Me.Width + 100,Me.Height + 100
0
 
andyclapCommented:
Set autoredraw=true

This creates an off screen bitmap for the image, so you can then query the pixels without needing the picturebox on screen.
When it's visible, don't forget to do a refresh after any updates which need to update immediately - otherwise the picture will only be updated when the application is "waiting"
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now