Re: Files to clipboard by Stefan
Stefan
Wed Feb 02 05:45:00 CST 2005
Try DoDragDrop(new DataObject(DataFormats.FileDrop, path));
Don't know if it works, I just suppose this should be the right way...
HTH,
Stefan
"sithlord" <sithlord@discussions.microsoft.com> wrote in message
news:B90A704A-C643-47D8-BDBE-87FE4A3C7565@microsoft.com...
>
> I'm NOT in a browser. Actually I'm writing a standard Window Form
> application, so I suppose I have the rights to do it. By the way, it's
> not a
> professional app, so security is not an issue. I really need how to do it
> in
> C#, I know that is possible using Win32 API and filling a DROPFILES
> struct,
> I hope I can also in C#!!
> Regards
>
> "Alvin Bruney [MVP]" wrote:
>
>> You can't. Assuming you are using a webpage, browsers aren't allowed to
>> touch system resources. Your best bet is to write or use an activeX
>> control
>> with the appropriate permissions.
>>
>> --
>> Regards,
>> Alvin Bruney
>>
>> [Shameless Author plug]
>> The Microsoft Office Web Components Black Book with .NET
>> Now Available @ www.lulu.com/owc
>> ----------------------------------------------------------
>>
>>
>> "sithlord" <sithlord@discussions.microsoft.com> wrote in message
>> news:1788F38B-7A88-4FD1-BAE1-3DD9E973023B@microsoft.com...
>> > Someone knows how to copy Files into the clipboard using C#? I've tried
>> > filling a DataFormat with FileDrop and I passed a string with the
>> > filename
>> > to
>> > setData() but no luck. I've also tried with a FileInfo object but It
>> > does
>> > not
>> > work. Is it possible? Please help!!!
>>
>>
>>