I know this is probably a boring question, however, I have scoured the Internet for answers and no one seems to have an answer to the following question listed below. Since I have just joined The Computer Learning Zone and Richard Rost knows what he is doing, talking about and is a complete expert at this, I am sure he can help...
My question is, how can I insert the date and time into notepad from VB6?
Thank you once again, for taking the time to read my question.
That's a tricky one. You could use the clipboard, copy the date from your app, shell open Notepad.exe, paste it there, but that might involve a WinAPI call.
Alternately, if all you need is just the date, you could just write out a text file as MyFile.TXT and then open that with Notepad. That would be easier to do.
I haven't had VB6 installed on my machines in YEARS, so I've got no way to try it for sure.
Thanks for your reply Richard, I will try my best. I am going to start with the Clipboard. Alex suggested the F5 method in Notepad which is great but I would like to do this programmatically. Might use AHK.
Dwight ArroyoOP
@Reply 5 years ago
Much thanks to Alex for all the options as well!
Dwight ArroyoOP
@Reply 5 years ago
Hello Richard:
I finally found an easy way to do this. Thanks to your course (VB 201), I was studying the "Print #1" method you used in reading and writing to files lesson. I inserted a timer onto the form, then added a non-visible text box, linked the date and time to the textbox and just used the"Print #1" method with the name of the textbox into notepad. Success! Thanks again Richard. I did want to ask you, what would be the best investment for me to purchase to upgrade my VB6 to something newer? To simplify, what new version of Visual Basic should I get? Thanks again for all your help!
Regards,
Dwight
Dwight ArroyoOP
@Reply 5 years ago
Hello Richard:
Just an FYI, disregard my most recent post regarding my question as to what platform I should upgrade to. My better question is, what application/language/platform do I need to get to follow along with your lessons on Visual Basic 2019?
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visual Basic Forum.