hoanvula
asked on
shellexecute to print and close app after
Hi,
I want to print any kind(pdf, doc,xls...) of document. Everything work with ShellExecute but the application open (exemple acrobat) does close after printing. I want to know how to close it after the print.
t = ShellExecute(0, "Print", "c:\temp\toto.pdf", "", "", 0)
Best regards
I want to print any kind(pdf, doc,xls...) of document. Everything work with ShellExecute but the application open (exemple acrobat) does close after printing. I want to know how to close it after the print.
t = ShellExecute(0, "Print", "c:\temp\toto.pdf", "", "", 0)
Best regards
Are you really working in VB.Net?...or is this VB6?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
You can replace Delay by System.Threading.Thread.Sl eep(5000)
Best regards
You can replace Delay by System.Threading.Thread.Sl
Best regards
You could...but only if having your GUI frozen and unresponsive for five seconds is acceptable to you. ;)
(a timer would allow the closing portion to be placed in a different sub and avoid both delay and sleep)
(a timer would allow the closing portion to be placed in a different sub and avoid both delay and sleep)