Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 26th, 2004, 10:56 PM
Authorized User
 
Join Date: Jan 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Undo string on graphics

Hello there,
            I was just wodering if its possible in visualBasic.net to actually undo the addition of a string to a graphics or undoing the last drawing I last performed.

Thanks,
Dinesh

 
Old January 27th, 2004, 12:03 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What do you mean by "undo"? Presumably, if you still have the original graphic you could just start over clean. But because you asked if you can undo I assume that you don't have that option. Once an image is saved you can't really "undo" anything.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 27th, 2004, 12:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick
Default

I am unfamiliar with GDI+, but in general, there are two approaches that I can think of:

(I am assuming you want to have only one undo. I you want multiples, then you should do similar things, but use a collection/array to keep each change.
1) Keep a copy of the image before the last change (As was suggested by a previous post). This is expesive in RAM, expecially if you want to do multiple undos.
2) Determine a bounding box that is smaller than the entire image, but contains all of the pixels of the change. Keep this section of the image as was done in #1, with a definition of where is is located on the whole image.
3) If you can do layers (again I don't know GDI+ yet), make each change on it's own layer. You can even give the user access to each layer's transparency, to give them more control.


John R Lick
[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to undo changes to my subform? dstein4d Access VBA 2 October 1st, 2008 11:30 AM
How do i write code to go back or undo sanderson Beginning VB 6 1 July 9th, 2008 05:10 PM
Undo/delete ' (single quote) in a textbox iniro VB.NET 2002/2003 Basics 1 April 6th, 2005 04:41 PM
how to undo the multiple record ??? elleetan Access 6 April 20th, 2004 04:14 AM
My UNDO wont UNDO socoolbrewster Access 2 March 22nd, 2004 08:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.