simple paint program like MS Paint... How?! I have questions :")

Nana.vb

New member
Joined
Apr 26, 2007
Messages
2
Programming Experience
Beginner
Hi,

I work with Microsoft Visual Studio 2005.



I'm about to build a simple paint editor similar to MS Paint program.


of course, it has Edit menu, with Undo, Redo, Cut, Copy, Paste, Delete... etc.


I have a problem with Undo and Redo!

How to do them with drawing?

have I use Stack or something like this?

I'm just a beginner and I have no idea


Another question..

For Cut, Paste, Copy and Delete, I need a selection tool same as the one in MS Paint.
Where can I find it? or how to Cut and Paste with out it?

Please, I really need your help :eek:

thanx a lot
 
You probably need multiple copies of the image, one for each action you want to undo/redo. That would be the easier option.

Hint about selection: when you do this in "selection mode" you click left mouse button down and move the mouse then release the button again. The down and up points are the opposite points in the selection rectangle you have to calculate.

To delete: fill the selected rectangle with backcolor or transparent.
To copy: copy the selected portion of image to clipboard.
To cut: first copy, then delete.
To paste: draw the image in clipboard (somewhere, into selection rectangle perhaps?).

See this site for some info about graphics: http://www.bobpowell.net/faqmain.htm
For documentation you can do most of this with what is in System.Drawing namespace, so read much there about Image, Bitmap and Graphics classes.
 
Back
Top