Click here to Skip to main content
16,006,065 members
Home / Discussions / C#
   

C#

 
GeneralRe: Access key for a user control Pin
leppie28-Dec-02 6:41
leppie28-Dec-02 6:41 
GeneralRe: Access key for a user control Pin
Jan Tielens28-Dec-02 6:42
Jan Tielens28-Dec-02 6:42 
Questiona question network ip add? Pin
imran_rafique28-Dec-02 1:37
imran_rafique28-Dec-02 1:37 
AnswerRe: a question network ip add? Pin
leppie28-Dec-02 2:14
leppie28-Dec-02 2:14 
GeneralRe: a question network ip add? Pin
imran_rafique28-Dec-02 4:27
imran_rafique28-Dec-02 4:27 
GeneralImageList Why such small storage Pin
gekoscan27-Dec-02 20:02
gekoscan27-Dec-02 20:02 
QuestionWhats best method to implement undo redo ? Pin
Smitha Nishant27-Dec-02 18:21
protectorSmitha Nishant27-Dec-02 18:21 
AnswerRe: Whats best method to implement undo redo ? Pin
James T. Johnson27-Dec-02 19:14
James T. Johnson27-Dec-02 19:14 
Smitha Vijayan wrote:
Keeping a backup image in memory can be one option. But when it comes to undo-ing multiple actions, it might become inefficient

I would keep two images in memory, the original and the current version. Then each time you perform an operation on it create and store some data that tells what that operation was. When you undo something, take the last operation off the stack of operations, then starting with the original image perform each operation.

You may want to limit the number of operations allowed to be undone, or come up with some other variant of that (every 8-32 operations create a new 'starting' image, etc).

James

"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972

GeneralRe: Whats best method to implement undo redo ? Pin
Smitha Nishant27-Dec-02 19:57
protectorSmitha Nishant27-Dec-02 19:57 
GeneralCompilation for Release Pin
gekoscan27-Dec-02 16:13
gekoscan27-Dec-02 16:13 
GeneralRe: Compilation for Release Pin
Anonymous27-Dec-02 17:43
Anonymous27-Dec-02 17:43 
GeneralRe: Compilation for Release Pin
gekoscan27-Dec-02 18:30
gekoscan27-Dec-02 18:30 
GeneralRe: Compilation for Release Pin
Brian Olej27-Dec-02 19:09
Brian Olej27-Dec-02 19:09 
GeneralUsing Font in C# Pin
gekoscan27-Dec-02 13:19
gekoscan27-Dec-02 13:19 
GeneralRe: Using Font in C# Pin
Smitha Nishant27-Dec-02 18:10
protectorSmitha Nishant27-Dec-02 18:10 
GeneralThe O'Mally problem Pin
afronaut27-Dec-02 6:43
afronaut27-Dec-02 6:43 
GeneralRe: The O'Mally problem Pin
Nick Parker27-Dec-02 9:01
protectorNick Parker27-Dec-02 9:01 
GeneralRe: The O'Mally problem Pin
Philip Painter29-Dec-02 11:55
Philip Painter29-Dec-02 11:55 
GeneralWeb Page in the Web browser control loses focus Pin
kiranj27-Dec-02 6:25
kiranj27-Dec-02 6:25 
Generalgoing from vs.net to commandline Pin
grv57526-Dec-02 22:03
grv57526-Dec-02 22:03 
GeneralRe: going from vs.net to commandline Pin
Stephane Rodriguez.27-Dec-02 8:08
Stephane Rodriguez.27-Dec-02 8:08 
GeneralProgramatically displaying dropdown menus from toolbars Pin
Arun Bhalla26-Dec-02 16:08
Arun Bhalla26-Dec-02 16:08 
GeneralIE -Com problems Pin
Calamitous26-Dec-02 9:58
Calamitous26-Dec-02 9:58 
GeneralRe: IE -Com problems Pin
Stephane Rodriguez.26-Dec-02 10:32
Stephane Rodriguez.26-Dec-02 10:32 
GeneralRe: IE -Com problems Pin
Calamitous26-Dec-02 11:33
Calamitous26-Dec-02 11:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.