Jump to content
  • Advertisement
Sign in to follow this  
gellin

c# picturebox question

This topic is 4458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm fairly new to C# and I'm trying to load in an image into the picturebox. When I do this, it loads the entire image into the picture box. What I want to know is if there is any way I can explicitly set the texture coordinates of the picturebox so it will only display a certain portion of the image I loaded up. Or if it is not possible, does anyone know of any free controls to replace the picturebox that will allow me to do it? Thanks

Share this post


Link to post
Share on other sites
Advertisement
PictureBox

Quote:

Clipping and positioning of the image in the display area is controlled by the SizeMode property which is set to values in the PictureBoxSizeMode enumeration. You can change the size of the display area at run time with the ClientSize property.


This should help, but I'm not entirely sure what you want to do. The picture box doesn't have texture coordinates like Dx or OGL. If you can somehow define a clipping rectangle it should have the same effect.

Share this post


Link to post
Share on other sites
I'll give this a try. What I'm trying to do is load up a single image that contains about 100 sprites or so. I want each of these sprites to show up in there own picturebox.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!