Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you output data to a notepad

Status
Not open for further replies.

CatCox

Technical User
Dec 21, 2005
18
GB
I have setup 8 forms each form using checkboxes, radio buttons and tick boxes. When you select a option I want this data to display within a notepad. The notepad application opens but its blank at the moment.

Thank you for your replies..
Cat
 
This is real time - it must create the data for that notepad.
For example select checkbox - server or client.
Display text server or client to the notepad.

Sorry but I rarely write code.
 
The problem with notepad is that it's not a COM server/container. You would be better off opening a Word document or Excel spreadsheet and writing to one of those. Your app knows about Word/Excel by setting a reference to each. AFAIK, you can't write directly to notepad. You would have to write to a file, then open the file in notepad in your application.

 
If you need to stick text into notepad on the fly, you'll be stuck with process switching and send keys. It'll be very flaky, and if anyone clicks a different window or types while you process is trying to update notepad, it wont work. I would HIGHLY recommend finding a different solution.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Make your own form with a textbox that functions like notepad.exe
 
If the user has existing notepad.exe running you can use windows API to connect to that specifice instance and use PostMessage calls to send whatever you want to notepad. What is nice here is you can send the application text even if it is minimized. You want to use the PostMessage function of user32.dll to send the text. And you probably want to use the FindWindow function to get the handle of the notepad.exe window. ~CIAO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top