View Single Post
Old Jun 23rd, 2005, 1:02 AM   #2
melbolt
Professional Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 254
Rep Power: 4 melbolt is on a distinguished road
if you want to work with stuff outside of your forms, you'll probably need to call unmanaged code (API's such as win32).

I just made a simple keylogger in .NET and this was one of the problems I encountered, I had to make a call out to some unmanaged code to achieve this. as for selected text, if you search around enough you can probably find the right thing to call to do something like that this way.

I believe there is an API function somewhere to get the selected text and place it in the clipboard, from here it would be easily retrievable from within your program by using a .NET class.

maybe try searching around here?
http://msdn.microsoft.com/library/de...pboarddata.asp

let me know if you figure anything out.


by the way, how are you planning on triggering the event?

what i mean is, does everything that is selected get copied, or are you going to click a button to make it happen or what?


edit: there's probably a way to save it to a file without using the clipboard at all, i'll look more into it later, i gotta get to bed for now though.
__________________
I have never let my schooling interfere with my education. -Mark Twain-

Xbox live gamertag: melbolt

Last edited by melbolt; Jun 23rd, 2005 at 1:39 AM.
melbolt is offline   Reply With Quote