VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shows how to save text to a file, restart windows, and add file to recent documents list on start b

by [email protected] (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 17th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Shows how to save text to a file, restart windows, and add file to recent documents list on start bar.

Rate Shows how to save text to a file, restart windows, and add file to recent documents list on start b



open ("file path and filename goes here!") for append as 1
print #1, date
print #1, time
print #1, text1.text
close 1


'to reboot windows Declerations:
private const ewx_reboot as long = 2
private declare function exitwindowsex lib "user32" (byval dwoptions as long, byval dwreserved as long) as long

'Code:
lngresult = exitwindowsex (ewxshutdown, 0&)

'add file to recent documents list on start bar desclerations:
declare sub shaddtorecentdocs lib "shell32.dll" (byval uflags as long, byval pv as string)

'Code:
dim strnewfile as string
strnewfile = ("file path and file name goes here!")
call shaddtorecentdocs (2, strnewfile)

'to clear
call shaddtorecentdocs (2, vbnullstring)







Download this snippet    Add to My Saved Code

Shows how to save text to a file, restart windows, and add file to recent documents list on start b Comments

No comments have been posted about Shows how to save text to a file, restart windows, and add file to recent documents list on start b. Why not be the first to post a comment about Shows how to save text to a file, restart windows, and add file to recent documents list on start b.

Post your comment

Subject:
Message:
0/1000 characters