0

hi
I am using An mdi form which contain many child form and mdi form contain ToolStrip1 in that redo & cut button are not working plz help me out of this

Private Sub toolredo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolredo.Click

    Dim activeChild As Form = Me.ActiveMdiChild
    If (Not activeChild Is Nothing) Then
        Try
            Dim tb As TextBox = CType(activeChild.ActiveControl, TextBox)
           If TextBox.CanRedo = True Then
                If TextBox.RedoActionName <> "Delete" Then
                   TextBox.Redo()
                End If
            End If
        Catch
            MessageBox.Show("You need to select a TextBox.")
        End Try
    End If
End Sub
3
Contributors
5
Replies
13
Views
4 Years
Discussion Span
Last Post by TnTinMN
0

Off the top of my head it looks like you should be using tb.CanRedo instead of TextBox.CanRedo, etc. If that doesn't fix it you'll probably have to show your code for the custom properties and methods you're using.

0

i had made changes bu it show me error that redo is not a member of system.windows.form.textbox

0

That means you'll have to create your own functions to do that. Probably something along the lines of storing the changes to the textbox, through the TextChanged event.

0

no how we do undo and redo on our system same like that happen on my software right now undo work properly bt redo dose nt work so need the code for redo

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.