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.
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.
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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.