[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Cut,Copy,Paste in MdiParent Menu

Posted on 2006-06-20
4
Medium Priority
?
445 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 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

650 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