home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / FINDAP.ZIP / GENERAL.FRM (.txt) < prev    next >
Visual Basic Form  |  1991-08-10  |  2KB  |  36 lines

  1. Form1
  2. General Test Program
  3. Form1
  4. Label1
  5. $This routine performs two functions:
  6. Label2
  7. 1) When actived from a COMPILED exe file, it checks for any existing instances of the program. If one is found it activates the other one and aborts this instance. Therefore allowing only one copy to be active at any one time. 
  8. Label3
  9. 2) An extention of the above idea allow us to check to see if any support applications, such as the Calculator or Control Panel are active. If so it uses the existing copy from RAM memory. If none is found then it loads the application from the hard disk.
  10. Command2
  11. Call the Control Panel
  12. Command1
  13. Call the Calculator
  14. Form_Click
  15. @    Form_Load
  16. Do_I_Exist
  17. caption
  18. Command2_Click
  19. Bring_NOTEPAD_Up
  20. Command1_Click
  21. Bring_CALC
  22. Bring_CALC_up
  23. Bring_CONTROL_Up
  24. Form_Load
  25.  Passes along the CAPTION to this form
  26.  to see if it already exists somewhere
  27.  on the DESKTOP. If so then the SUBROUTINE
  28.  passes FOCUS to the other copy and aborts
  29.  this instance of the program
  30.  SPECIAL NOTE:  When creating applications that use this function make
  31.  sure that when you compile the program to an EXE that
  32.  you name the APPLICATION TITLE ( see MAKE EXE box) thef
  33. '                same name as the CAPTION.
  34. Command2_Click
  35. Command1_Click
  36.