Hi
I'm trying to implemet the Copy, Paste, Cut, Select all, Redo, Undo funtions. I have a MDI form with the Edit menu and several child forms, I try some methods but no one works:
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click
My.Computer.Clipboard.Clear()
If TypeOf Me.ActiveControl Is TextBox Then
Dim objControl As TextBox = Me.ActiveControl
My.Computer.Clipboard.SetText(objControl.SelectedText)
ElseIf TypeOf Me.ActiveControl Is ComboBox Then
Dim objControl As ComboBox = Me.ActiveControl
My.Computer.Clipboard.SetText(objControl.Text)
ElseIf TypeOf Me.ActiveControl Is PictureBox Then
Dim objControl As PictureBox = Me.ActiveControl
'My.Computer.Clipboard.SetData(objControl.Image)
ElseIf TypeOf Me.ActiveControl Is ListBox Then
Dim objControl As ListBox = Me.ActiveControl
My.Computer.Clipboard.SetText(objControl.Text)
Else
' No action makes sense for the other controls.
End If
End Sub
Some suggestions?
Regards
Everything is possible, just keep trying...