Fantomas wrote:
Hello, Rainer!
Sunday, March 15, 2009, 10:22:04 PM, you wrote:
I tried system.hprevinst, but this shows always 0.
If there are more copys of the program then hinstance is always the same
value.
hPrevInst does not work under Win32. It is only for Win16, AFAIK. Use a named
mutex, as it was given, or a named event. Also, you can find a window created by
the previous instance by its class name.
There is a technique presented at
http://www.flounder.com/nomultiples.htm
It's not in Pascal, but the same technique should work in any language.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal