Languages Visual Basic & VB.NET Visual Basic VB function enhancement  

Check for PrevInstance

download download  
important code information
author:
Sergio del Rio
minimum requirements:
Check for PrevInstance description

This code checks for a previous instance of the program. This is not like the App.PrevInstance property. This checks the prevInstance no matter the location of the file, or the name of the app. You don't have to call DestroyWindow to destroy the created window, since when you quit the application, it is self destroyed. This may not work in the VB IDE, because the window is created by VB6.EXE. In this case you can call DestroyWindow in the Form_Unload().


##############################################
# PrevInstance application by Sergio del Rio #
# April 16th, 2005 #
#############################################

This program checks for a previous instance of
the application. No matter where the exe is
located, it detects it. It is not like the
App.PrevInstance property.

It works by creating a "STATIC" window with a
specific code as the caption.

If the function finds the window containing
the code, then there is another instance
running.

You can change the InstanceCode for any string
you want.

You don't need to call DestroyWindow API, since
the window self destroys when the program is
closed.


File List:
Check PrevInstance/0b
Check PrevInstance/Application.vbp1Kb
Check PrevInstance/READ ME FIRST.TXT1Kb
Check PrevInstance/frmMain.frm1Kb
Check PrevInstance/modInstance.bas1Kb

Similar code
A VB INI file manager -- no API's!!! (Popularity: ) : This code provides pure VB source for the following API calls: GetPrivateProfileSection, GetPrivateProfileString, WritePrivateProfileSection, and WritePrivateProfileString. With this code, YOU CAN ACCESS LARGER *.INI FILES!!! Unlike the traditional API commands, there is no limit to the size of *.INI file ...
Active X DLL Made Into Windows DLL (Popularity: ) : Ever want to make Windows DLLs or Windows Control Panel Applets But stuck With VB Active X DLLs? Here is your answer: Now Includes: -.Def Maker Addin- Define Helper File Maker (Takes your exported functions and makes them defines for ...
Random String Generator (Popularity: ) : There are many random number generators, word generators, string generators, etc., etc. but most of them generate random stuff by means of an algorithm, this uses no algorithm and little math is involved. it works by tracking the location of ...
AddIn Insert Procedure Headers (Popularity: ) : This Add-In allows E-Z formatting of Procedure headings. I wrote this because of the laziness of fellow developers who saw no sense in taking the time to AT LEAST document a Subroutine or Function or Property (until 6 months down ...
RoutineBuilder v2.5 (Popularity: ) : vbRoutineBuilder 2.5 First off this code started with Kurt J. Tischer's first http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=40345&lngWId=1 Routine Builder project and has since taken off from there. Hopefully, this will save you a lot of repetitive typing and make your code more uniform and ...
A Code Designer (Popularity: ) : Ever had a look on someones other well designed source code and wondered how they did this ? With this little Application u can do the same with one click
Add Bitmaps To Menu (Popularity: ) : Demonstrates how to add bitmaps to menus using VB 5 or 6
Active Controls (Popularity: ) : Provides a method of detecting when the mouse enters and exits a control including labels and images. This routine leaves all events enabled and functioning including the MouseUp and MouseDown events.
Zip n Mail Project (Popularity: ) : Add-in for visual basic that will zip up all files in the project and open a new mail message with the subject as the name of the project. Can also password protect the zip file. pkzip and winzip compatible.
ActionKeyState (Popularity: ) : A modification on Phobos submission for manipulation CapsLock, ScrollLock and NumLock. I made a function to either get the status or set (On, off, toggle) the status for these keys. Since i don't have Win95/98, i left that code out ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os
stats
downloads 88
version
size in Kb 2
popularity   1566/7913374
user rating 5/10
ad


New Code
Popular Code