Solved

checking for shared folder access

Posted on 2003-12-07
4
144 Views
Last Modified: 2010-05-03
i thinking of making a program that runs in the backgroud
and check for any user that is accessing my shared folder and let the program inform me.

i tried using NetSessionEnum . The tutorial that i found uses button to check everytime. I added a Do loop but it causes a high cpu usage.

example of my loop:

 Do While run 'start loop
       
       If currenttick + delay <= GetTickCount() Then
 
             [commands/check session]

            currenttick = GetTickCount()  'Reset the timer variable
        End If
       
        DoEvents
 Loop


i'm sure theres is a better way . Any idea ..??
0
Comment
Question by:jonathanx
4 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 100 total points
ID: 9894839
Use a timer and put your code in the timer event.

Idle_Mind
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now