Solved

Cut,Copy,Paste in MdiParent Menu

Posted on 2006-06-20
4
439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

690 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