VB apps that run in bkgrnd, DoEvents Qs 
Author Message
 VB apps that run in bkgrnd, DoEvents Qs

Hi All,

I have written a VB4 Pro 16-bit app that runs in the background and
tracks app usage for charging to clients and managing the network.  

The program works well and my company likes it, but often slows down
the PC noticeably, and I can't help thinking it could be better (no
programmer ever really finishes writing a program, do they?).

Does anyone have experience, suggestions, or whatever for VB apps that
run continuously in the background?  Simply adding more DoEvents does
not seem to change overall performance, is there a better way?

Please avoid any temptation to suggest re-writing it in C, the company
wants it in VB.

Here is a simplified version of the code that runs in the


        If MyApp.WindowState <> 1 Then
                ...user set focus to my app so wake up
        End if


        H% = getactivewindow()
        ActualApp$ = UCase$(ExeName(H%))
        If ActualApp$ = CurrentApp$ Then GoTo Still_Sleeping

        ...Check for screen saver (which is not chargeable)
                ...if screen saver then loop

        ...Check app name to determine if new app is chargeable
                ...take appropriate action then loop

Thanks in advance for any suggestions.


Mon, 29 Nov 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Run VB app directly from CD without running setup

2. running DOS PROgram from VB APP using variables in the app

3. Warning message when creating Excel object from Vb App when app is running as a service

4. Doevents in Console App?

5. DoEvents slows an app down.

6. Are there problems running VB 4 and VB 5 apps on same machine

7. too many doevents, does it crash app??

8. How to Run VB EXE From Within VB App

9. Using DoEvents while running batch files

10. Need DoEvents/SendKeys for program to run correctly

11. How to get a list of running apps and How to close down apps

12. CAB questions: 1) run app after install 2) installed multiple apps


Powered by phpBB® Forum Software