in vb 2008 express this option is available under application properties. does anyone know what is its function? does it make it so that it's impossible to open two instances at the same time?
There is even a easier method:
Use the following code...
On the main form load event do the following:
If File.Exist(Application.StartupPath & "\abc.txt") Then 'You can change the extension of the file to what ever you desire ex: dll, xyz etc. msgbox("Only one Instance of the application is allowed!!!") Enviornment.Exit(0) Else File.Create(Application.StartupPath & "\abc.txt", 10, Fileoptions.DeleteonClose) Endif
This will take care of single instances as well as thin clients, and the file cannot be deleted while the application is running. and on closing the application or if the application crashes the file will delete itself.