If the image is loaded into a hidden image control or VB stdPicture object, you can easily draw that image to a picturebox using VB's PaintPicture. Don't need BitBlt in this case; just another option.
Edited: To imitate pressed state, paint the picture just 1 pixel down and to the right. When unpressed paint it back at its normal position.
simple example, assuming your picture is in a hidden image control & picture1 scalemode is pixels
Edited: Odds are that your picturebox will have AutoRedraw=True. If so, you will want to refresh the picturebox after all of your drawing is done.Code:' not pressed: Picture1.Cls Picture1.PaintPicture Image1.Picture, 0, 0 ' pressed: Picture1.Cls Picture1.PaintPicture Image1.Picture, 1, 1




Reply With Quote