Implement Undo/redo In An Application?
Apr 5, 2009how to implement undo/redo in an application? I've searched the web, and most I found don't work properly or just clear the textbox.
View 9 Replieshow to implement undo/redo in an application? I've searched the web, and most I found don't work properly or just clear the textbox.
View 9 Repliesbasically add and remove text and selection information from a stack. Result: When using Undo/Redo the selection got messed up, the text moved, sometimes causing lag of epic proportions. I need a way of having complete and smooth undo/redo class for storing all information I would possible need.How to know whether or not to add an undo stack is easy, I just checked if the user clicked in the text or moved using the arrow keys. As soon a previous marking was given for "next text change needs to be backed up", it was backed up. At that point I stored the RTF and selection start/length. What do I have to store of a RichTextbox control to be able to restore it to a previous state, and how can I reset it back to a previous state? See it as having a "RichTextBoxState" class:
Public Class RichTextBoxState
Sub New(ByVal RTB As RichTextBox)
Me.text = RTB.RTF
Me.selectionstart = RTB.SelectionStart
[code]....
After restoring it must display the EXACT same thing as when it was saved as a state.
Just finished a database for stock management system in local terms and language. All according to their request and agreement. Now they need me to add undo/redo functionality to the application and I just dont know where to start. I am looking first for a general tip on where to begin:
I have one form, for e.g., that manages their stores. Then another for catagories...now they need the undo for all this things and am not sure if it is even possible cos datas are related.
i want to implement undo/redo function in icon editor, im try to use arraylist or Stack to hold current icon or picturebox image when mouse up and left mouse is not press. i dont know exact place to put the Stack for push.
View 2 Repliesi have written code for undo and redo operations code for undo operation
[Code]...
now when i rotate the picture then tries to undo the image then this erorr comes Stack is Empty and program closes.
I understand that implementing an UnDo/ReDo function can be complex using Stack operation/XML serialization.
That is why I have started to search for commercial tools/components, but I could find such tools only for RealBasic, not for VB.net. Does anyone know where to get such tool/component, or has good example code to include various undoable operation into an Undo/Redo function, that means undo operation for datagrid and chart manipulation (similar to a spreadsheet application).
i need this option for a textbox. the undo/redo in two separate buttons and it should be for multiple times not just once.[code]
View 21 RepliesAfter a rtf. file is loaded in richtextbox....then the user highlights the text with different colors.How can I set both redo and undo button to backward and forward the steps(only the part of higtlighting)?
View 19 RepliesI'm trying to setup undo/redo for changes to a datagridview, but am having a problem with capturing the cell value before it is changed. I am currently using the CellEnter event to capture the original value, which is fine if only one cell is affected. However, if the user selects multiple cells and goes to cut the data (Ctrl-X), CellEnter does not fire for each of the selected sells, only the ones moused over it seems. Is there a better way to capture each cell value before their CellValueChanged event fires?
View 1 RepliesI am trying to build a simple syntax highlighter editor along with undo/redo feature. I have the code to syntax highlight the code on "TextChange" event but the undo/redo feature does not work.Any work arounds on implementing syntax highlighting with undo/redo?
View 2 RepliesI have a problem with my code. After I click undo I can't draw on the image and I don't know why
This is my code
Imports System.Drawing.Graphics
Imports System.Drawing.Bitmap
Imports System.Drawing
Public Class FrmChild
[Code] .....
I was wondering if there is a way to modify the limit on the number of undo/redo actions a RichTextBox is capable of performing. It seems as though the limit is around 100, and I really need to increase this because of the demands of my application. I have text formatting (Bold, Underline, etc.) in my application, and since you can change the font of the text, I need to loop through the characters in the SelectedText one-by-one and apply the correct formatting to them in order to prevent any errors from appearing. Every time a single character is formatted, it counts as an action. As you can imagine, this quickly adds up and therefore makes my undo/redo features not as useful as I'd hope with the 100-action limit. Does anyone have any suggestions for me?
View 3 Repliesi am developing one eform designer project..the main object of this project is there a form in this controls are drag and drop.moving and deleting and editing the properties ..it's like a our .net designer how we drag and drop the controls ..so in my project i need to implement undo/Redo functionality..please give me the basic idea of this..(Please think like a our .net Designer (UNDO/REDO))
View 2 RepliesAfter getting the code below from here, I would like to learn how I can easily copy/paste and undo/redo actions. The code below allows a person to "draw" on the image.
[Code]...
I have created a Form, added a MenuStrip to it and inserted the standard Items. My question is that I know some of the options won't work like 'Save' and 'Save As' but how do you make ones like 'Open' 'Exit' 'Undo' and Redo' work when start debugging?
View 9 RepliesI try to implement undo in drawing program I want to save the bitmap after every drawing and push it to stack then when the user click the button it will change the image to the last bitmap saved in the stack here is my code
Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp
Xend = e.X
Yend = e.Y
[code]....
Is there a way I can have my VB application run Flash in my VB window and communicate with like the variables, objects, and other stuff in the Flash movie? Such as if I wanted to get a variable or set a variable in the Flash window.
View 2 RepliesI am Newbie in XMPP . I want to create chat application in VB.net using XMPP .i am having ejabberd serverin my pc.i dont know how to intract with ejabberd server via VB.net.
View 1 RepliesI want to add Ruler line to my application..how can i achieve this..
View 6 RepliesI am trying to build a class. I am having a difficult time conceptualizing how a class is built and how it works. I want to be able to build a USEFUL class and implement it in an application.
View 1 RepliesHow can I implement Ajax in asp.net 2.0 application.
View 1 RepliesHow to implement drag & drop for a WPF application? I could open 2 the same apps and drag an object from one to another. Here's what I want to drag:
<Grid Width="100" Height="50">
<Rectangle BackGround="Red"/>
<TextBlock>Hello World</TextBlock>
</Grid>
The Grid has to look the same in the other app where it is dragged as the one from it was dragged.
I'd like to implement DWebBrowserEvents2.DownloadComplete into my Application
My Code
Imports System
Imports System.Text
Imports System.Windows.Forms
[Code].....
I need help to implement multiple threads in application.Assume ds.table(0) has 5 and sometime 6 rows rows for i=0 to ds.tables(0).rows.count-1.I have to apply multiple threads, means all five/six rows should start at once using thead and "Process 1" .."Process 4" should also handled by threads.This is hierarchy that I have to apply with threads, how can I do it. It is requested to put piece of code so I can understand better.
View 13 RepliesI have to implement OO scripting in VBS/JS, wondering what's the best way to do that.he scripting engine has to be able to create new methods for existing object in the application and allow calling the methods in other existing objects.
View 4 RepliesIs there a way to undo "Build" or "Publish" actions (like unbuilding/unpublishing) in order to get the original files/folders of the application? I am creating a program for a homework assignment and we aren't supposed to build or publish our applications but I didn't save my project before building and publishing it (out of curiosity) and I didn't upload the application's folder to the FTP server before so now there are "extra" files and folders (created during the build/publish process) and I don't know which ones are the "extras" and which I need to upload.
View 2 RepliesI was wondering how to implement a custom character set for use by an application, i.e. hex bytes that are read by the program then converted and displayed in the window. If this requires first converting the bytes in a file to an already implemented character set, I'm cool with it - I'll go with whatever works or works best. I'm writing with VB.NET 2010, and running Windows 7 Home Premium x64, by the way.
View 2 Repliesi have one problem to implement finger print scanner using we application.
how it possible,i have digital persona kit
I want to learn the Database application programming. Especially, the multi-user environment. User can update the data at the same database. So, could you give me some advices ? Does it should use SQL server db ? How to connect with the the SQL server from other PC user ?
[Code]...
I'm wondering if there is any scheduler control in Vb.Net -MS VS 2005- and if not I hope I can find a one - free - that I could use on my application...
how to implement scheduling tasks requirement in my application..