2 Replies - 296 Views - Last Post: 05 February 2013 - 01:45 PM Rate Topic: -----

#1 vvk44  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-October 12

How to cut & redo text on mdi form to child form

Posted 05 February 2013 - 12:50 PM

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 please 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.redo Then
    TextBox.Redo()
    End If
    End If
    Catch
    MessageBox.Show("You need to select a TextBox.")
    End Try
    End If
    End Sub




Is This A Good Question/Topic? 0
  • +

Replies To: How to cut & redo text on mdi form to child form

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3181
  • View blog
  • Posts: 10,659
  • Joined: 12-December 12

Re: How to cut & redo text on mdi form to child form

Posted 05 February 2013 - 01:39 PM

Please indent your code properly, it is difficult to read and follow.

Disable the Try..Catch so that you can see any error messages.

TextBox.Redo, and other code, is highlighted as an error. Point at the phrase and an error message pops up. Read and correct all these errors. (I assume you meant to refer to the tb instance of a TextBox.)

.redo is not a property of a TextBox (or TextBox instance) unless you have assigned this custom property elsewhere.

.. a quick search suggests that CanRedo, etc., apply to a RichTextBox, not a TextBox.

This post has been edited by andrewsw: 05 February 2013 - 01:36 PM

Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3181
  • View blog
  • Posts: 10,659
  • Joined: 12-December 12

Re: How to cut & redo text on mdi form to child form

Posted 05 February 2013 - 01:45 PM

Textboxes only have a single level of Undo (and possibly redo). To add this extended functionality requires quite a lot of code, as demonstrated here, or a plug-in.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1