![]() |
accessing notepad's textfield
i need to access notepad's textfield. without saving. does vb have any function or api for this?
example: i have notepad open. there are some texts there but still not saved. (ie "Untitled"). i need my vb program to read those texts. thanks! :D |
i dont know if that is even possible. but i dont know
|
Try the SendKeys API. It's not extremely reliable, unfortunately, but it should get the job done.
|
can u tell me what those are? i dont know anything about that.
anyway i think WM_GETTEXT should get the job done. how do i use this? syntax/declarations? thanks. |
Ah... sorry, thought you wanted to send text to Notepad. All you really need, then, is the handle to the text box.
|
Put this in a blank form, open up notepad, type something in, then run!
Also works for password textboxes! :) :
Private Declare Function SendMessage Lib "user32" Alias _ |
thanks.. ill try it
|
Or you coudl just do this.
:
Private sub Cmdsend_click()Eithier way works just fine |
I said that. He needs to get stuff from the text field, not send stuff.
|
Oh I see...I am not quite sure how to do that. Maybe a read API?
|
| All times are GMT -5. The time now is 6:08 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC