Copy, cut and paste implementation
- Use the system-wide clipboard , in case the user copies an application in one instance and pastes it into another, or if the user closes the window and reopens it, they can paste back the data.
- Inherit all forms of a program from a base class that implements copy and paste.
- To copy (or cut), serialize the object and place it on the system clipboard.
- To paste , read the system clipboard and try de-serializing back to the shape object (if the cast fails, the contents of the clipboard were not your application object).
- Move the position of the inset shape slightly to the left and bottom (so the user knows that there is a new shape in the picture)
a source to share
in short, there are two ways
1) own clipboard 2) system-wide clipboard
in the second case, the use is to use a standard format for storing your data. read MSDN for more information on Windows Clipboard
or you can maintain two clipboards - your own and the system one. then in your clipboard you can store certain information for your application and in the system click only the image
a source to share
Here are some global dots that will dramatically accelerate the problems you face.
Try to find a reversible line / rubber band. to make a selection in the picture. Try searching for LockBits in VB.NET to create a quick way to read and write pixels. Try to examine the background thread and report progress. For pixel operations that take a long time. Try to do MDI. With enough status bars to communicate status. Try serializing to xml / binary when saving the project file to disk (like psd). It can also be useful for creating an undo function.