How to implment Copy, Paste, Cut in a MDI applcation?
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



How to implment Copy, Paste, Cut in a MDI...Expand / Collapse
Author
Message
Posted 04/12/2008 12:27:12 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 12:39:57 AM
Posts: 43, Visits: 89
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...

Post #15572
Posted 04/14/2008 11:22:07 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:47:41 AM
Posts: 4,104, Visits: 4,175
What part is not working?  Does the clip text never make it into the clipboard?
Post #15594
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 9:59am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.