I am drawing a tile map onto a pictureBox. In the paint event of the PictureBox I declare a bitmap:
Dim screendisplay as New Bitmap (C:\sourcebitmap.bmp)
Where sourcebitmap is the file holding my tiles.
I then draw the tile map by using e.DrawImage , a loop and an array to assign different regions (ie the tiles) of sourcebitmap to the picturebox surface.
When the user clicks on the display I want to retrieve the colour of the pixel clicked. To do this I need (I think) a bitmap object that represents the screen display. How can this be done?
Dim screendisplay as New Bitmap (C:\sourcebitmap.bmp)
Where sourcebitmap is the file holding my tiles.
I then draw the tile map by using e.DrawImage , a loop and an array to assign different regions (ie the tiles) of sourcebitmap to the picturebox surface.
When the user clicks on the display I want to retrieve the colour of the pixel clicked. To do this I need (I think) a bitmap object that represents the screen display. How can this be done?