Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I create a small application

I select files form folder then Press My Hotkey it sends a Copy Command Like this

C#
SendKeys.SendWait("^C");



but after i cant get file paths from Clipboard but notepad text working file

Why is that any other way to get file paths to clipboard

What I have tried:

i tried
C#
SendKeys.SendWait("^C");


And

C#
SendKeys.Send("^C");


but problem is the same
Posted
Updated 15-Jun-16 0:06am

Your best off using the clipboard class. Have a read of this Clipboard handling with .NET[^]
 
Share this answer
 
It is possible that SendKeys is not activating the shortcut command Ctrl-C. You may get the desired result by sending a sequence of menu commands.

In Explorer the menu equivalent of Ctrl-C is
Alt-E  Open the edit menu
C      'Click' the copy menu item


Instead of Ctrl-C send Alt-E followed by C, i.e. SendWait("%EC")

Alan.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900