VB to open and close Internet Explorer

  • Thread starter Thread starter Howard
  • Start date Start date
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?
 
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!!
 
Back
Top