Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Saving and restoring PictureBox
I'm writing a Game in VB 2005. The Game Board is displayed in a PictureBox on the Main Form. Occasionally I will display a graphic over a portion of the Game Board, so I need to save the PictureBox (in Memory), so that it can be restored afterwards. I've read a lot of stuff and tried a lot of different code, but still can't get it functioning 100%. Could someone please give me a small sample code that might do the trick. I do not want to give you the code that I've come up with, it doesn't work anyway, because I'm hoping for a new perspective that might solve the problem. Restoring the PictureBox from a File on disk is not an option.
Just to clarify things, here's the logic:
- There is an image (my Game Board) in the PictureBox.
- Save the PictureBox in memory.
- Display a smaller graphic over some portion of the PictureBox.
- Wait for an Event like a Mouse Click.
- Restore The PictureBox from what was saved earlier.
That's it! Can someone help?
And Thank You Kindly.
0 · ·