Click here to Skip to main content
15,906,333 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionReading from notepad File Pin
Mr kilany6-May-06 3:08
Mr kilany6-May-06 3:08 
AnswerRe: Reading from notepad File Pin
Colin Angus Mackay6-May-06 3:15
Colin Angus Mackay6-May-06 3:15 
AnswerRe: Reading from notepad File Pin
kkppttoo7-May-06 0:49
kkppttoo7-May-06 0:49 
Questiondouble rows Pin
microuser_20006-May-06 2:03
microuser_20006-May-06 2:03 
QuestionCopy Objects - Am I missing something? Pin
Kaditcher6-May-06 1:07
Kaditcher6-May-06 1:07 
AnswerRe: Copy Objects - Am I missing something? Pin
Joshua Quick6-May-06 9:39
Joshua Quick6-May-06 9:39 
GeneralRe: Copy Objects - Am I missing something? Pin
Kaditcher9-May-06 7:24
Kaditcher9-May-06 7:24 
GeneralRe: Copy Objects - Am I missing something? Pin
Joshua Quick9-May-06 17:14
Joshua Quick9-May-06 17:14 
I've never implemented undo/redo functionality before, but it sounds like you've got the right idea.
Before you change the state of an object, you should clone it and push it into the Undo stack. When the user does an Undo, you should pop the object out of the Undo stack and overwrite the current object with it. The only gotcha you have to worry about here is if there are any objects still referencing the Undone object. If this is the case, then you may need to hold the undo-able object in some kind of container class so that you don't have to update all of the references. In fact, the container class should probably implement the Undo functionality.

I found an article on CodeProject covering an undo/redo framework written in C#. Perhaps it might be of use to you.
http://www.codeproject.com/csharp/undoredobuffer.asp[^]
Questionselecting control at runtime (VB.NET) Pin
A M SOMAN6-May-06 0:55
A M SOMAN6-May-06 0:55 
QuestionPrinter Object in VB Pin
cberam6-May-06 0:01
cberam6-May-06 0:01 
AnswerRe: Printer Object in VB Pin
Duncan Edwards Jones8-May-06 3:23
professionalDuncan Edwards Jones8-May-06 3:23 
QuestionDSN File Change at run time Pin
prashantvashisht5-May-06 23:22
prashantvashisht5-May-06 23:22 
QuestionDisable Guest Account in VB Pin
QuickDeveloper5-May-06 23:07
QuickDeveloper5-May-06 23:07 
QuestionDatagrid Pin
militiaware5-May-06 21:33
militiaware5-May-06 21:33 
AnswerRe: Datagrid Pin
nesNYC7-May-06 20:07
nesNYC7-May-06 20:07 
GeneralRe: Datagrid Pin
militiaware7-May-06 23:29
militiaware7-May-06 23:29 
GeneralRe: Datagrid Pin
nesNYC8-May-06 5:11
nesNYC8-May-06 5:11 
QuestionProcess cpu usage of wmiprsve is 99% when getting processes Pin
MohammadAmiry5-May-06 20:53
MohammadAmiry5-May-06 20:53 
QuestionDatagrid Pin
militiaware5-May-06 20:52
militiaware5-May-06 20:52 
AnswerRe: Datagrid Pin
User 17164928-May-06 5:33
professionalUser 17164928-May-06 5:33 
GeneralRe: Datagrid Pin
militiaware9-May-06 21:13
militiaware9-May-06 21:13 
QuestionWeb Application related query Pin
Vijaya Krishnamoorthy5-May-06 19:54
Vijaya Krishnamoorthy5-May-06 19:54 
AnswerRe: Web Application related query Pin
Guffa5-May-06 23:35
Guffa5-May-06 23:35 
GeneralRe: Web Application related query Pin
Vijaya Krishnamoorthy5-May-06 23:47
Vijaya Krishnamoorthy5-May-06 23:47 
QuestionLow virtual memory Pin
SwatiPathania5-May-06 19:10
SwatiPathania5-May-06 19:10 

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.