Thanks, but that doesnt work for my case
Thanks for the reply. I did try this code from blackbelt vb.com too. The problem is it prints whatever window has the focus at execution time. I tried it many ways to execute as a .exe file too. It printed the Windows Exploere once, believe it. And in my case I cannot set the focus to my form to be the active window, because I want to hide it and then print it for the user. Another different form has the focus at that moment. Please help me. Thanks,
Reflex.