VB to open and close Internet Explorer

H

Howard

I need to automatically start Internet Explorer during
Windows Start Up, let it run for 2 minutes and then close
IE. How can I do this? I know that I can put a URL in the
startup folder, but then how can I get IE to automatically
close in 2 minutes?
 
C

crouchie1998

What version of VB are you using? I code now in VB 6 &
VB.NET 2003.

User the 'ShellExecute API' Function to launch IE (at ...
URL)
Add a timer to a form

After 2 minutes either use 'SendKeys' (ie. ALT + F4) to
close it. With this method you don't want anyone on the
computer. Below is better.

If you don't want to use SendKeys then get the handle of
the window, and close it from there


Easy!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top