Solved

Cut,Copy,Paste in MdiParent Menu

Posted on 2006-06-20
4
426 Views
Last Modified: 2010-04-23
Hi,

Thanks for clicking

I have a parent mdiwindow that has the standard microsoft menubar at the top

Under Edit we have Cut, Copy, Paste

Have downloaded several demo's, but they are either vb6 or simply copy from one textbox to another. (i.e. the code is specific to the textbox)

Need the code that will copy, cut and paste independent of which control on whichever form is highlighted

Realise that it has something to do with Dim DataObject As System.Windows.Forms.IDataObject = System.Windows.Forms.Clipboard.GetDataObject()

but just having trouble putting it altogether

Can anyone help?? I'd be so grateful
0
Comment
Question by:StanLawrence
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 16942255
Try this:

SendKeys.Send("^x")     ' cut
SendKeys.Send("^c")     ' copy
SendKeys.Send("^v")     ' paste
0
 

Author Comment

by:StanLawrence
ID: 16942669
Hi AlexFM,

Thanks for replying,

That doesn't seem to work. Think it might be due to focus moving to the Cut,Copy ,Paste buttons that are programmed with above.

Any other ideas??
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 16943317
I tested this with single form with menu and two text boxes, it worked. If it doesn't work in your case, you need something else.
0
 

Author Comment

by:StanLawrence
ID: 16950698
Hi AlexFM,

Upon revisiting, we realised our silly error.

Was due to using Button on the form in question, rather than menuitems

And was doing SendKeys.Send("^x) rather than capital X

Thanks very much for your help on this issue.

Realise it's a small solution, but the 250 points is well worth it to us since could have done round in circles for ever.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now