Skip to main content
GameDev.net gamedev.net
🔒 Locked

c# picturebox question

Started by gellin Apr 6, 2006 at 10:50 AM 1 replies 1.4k views
Original Post
gellin
gellin
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
Scet
Scet
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.
gellin
gellin
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.