Jump to content

Recommended Posts

Guest ChrisJM
Posted

How do i use gfx and define it to a variable? Like i did here when i made the bitmap:

private Bitmap blockSprite;

 private Point currentLocation;

 //private void CreateBlockSprite()

 {

  // Create a new "Image" that's 100x20 pixels

  blockSprite = new Bitmap(100, 20);

  // Get the graphics so that we can draw

  Graphics g = Graphics.FromImage(blockSprite);

  // Draw a solid red rectangle that's 100x20 pixels

  g.FillRectangle(new SolidBrush(Color.Black), new Rectangle(0, 0, blockSprite.Width, blockSprite.Height));

 }

instead of using that id like to use a gif, how do i do it?

  • 3 weeks later...
Guest Brody
Posted

You should say how so that the question doesn't get asked by others!

Guest ChrisJM
Posted

hehehehe ok ;-) where you say ball (or wateva) = new Bitmap("sizes etc");

use this:

ball = new Bitmap(@"wherethefileis");

that ok? :)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.