Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple vb app needed

Status
Not open for further replies.

twcman

Programmer
Jun 28, 2001
284
US
I manage our corporat LAN website and was wondering
how hard would it be to write or how much would it cost to have a simple vb app written to do the following:

i need for the app to be resident on the client machine. It will only need to open a website within a browser and upon closing delete all files from a temp dir on the client machine. both pieces of info should be in an .ini file or some read/write file so i can change them.

I would need to change the url for the website and the directory path, on the client machine for the file deletion.

thanks,

 
Sure it's easy to do. Do this (note, this uses IE):

Code:
'Option Explicit

Public WithEvents Explorer As SHDocVw.InternetExplorer
Public NavigateFile As String


Private Sub Command1_Click()

NavigateFile = "C:\directory\where\your\file\is"

nf = Dir(NavigateFile)

If nf <> &quot;&quot; Then
    Open NavigateFile For Input As #1
Else
    MsgBox (&quot;The file &quot; & NavigateFile & &quot; is missing.  Please add it.&quot;)
    End
End If

Set Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True

Line Input #1, place
If place <> &quot;&quot; Then _
    Explorer.Navigate place
    
Close #1

End Sub

Private Sub Explorer_OnQuit()

'remove the files you want removed
MsgBox (&quot;remove files now&quot;)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top