Hello there.
I've just switched from VB6 to VB .Net and I'm having a bit of trouble with the following:
I have an image, which I load using:
Now this image is about 640 pixels high and 64 pixels wide, and I want to draw part of this image (64x64) to a PictureBox. Starting from the top 64x64, looping through the Y axis until the bottom 64x64 pixels are drawn, to create a kind of animation effect.
I create an instance of the Graphics() Class and use the DrawImage overload function, but I'm not sure which one to use - there's 30 and most (if not all) seem to fit the entire image into the 64x64 part that I want to draw!
Does anyone know the best way to do what I want? In VB6 I would use Bitblt, - is there a better .Net way (preferably just as fast!) Or, if I want to use BitBlt in .Net, how do I? When I call the API I keep getting an error telling me that the .Image can't be converted to a Long (or an Integer).
Any help would be much appreciated.
Pete
I've just switched from VB6 to VB .Net and I'm having a bit of trouble with the following:
I have an image, which I load using:
Code:
Dim myBitmap As New Bitmap("C:\myImage.BMP")
I create an instance of the Graphics() Class and use the DrawImage overload function, but I'm not sure which one to use - there's 30 and most (if not all) seem to fit the entire image into the 64x64 part that I want to draw!
Does anyone know the best way to do what I want? In VB6 I would use Bitblt, - is there a better .Net way (preferably just as fast!) Or, if I want to use BitBlt in .Net, how do I? When I call the API I keep getting an error telling me that the .Image can't be converted to a Long (or an Integer).
Any help would be much appreciated.
Pete