Hi, Eurico

Ages ago someone passed me the enclosed routine.

What you do is put it in your main prg and when you run it, it will allow only 
one instance.

I needed it in the old days, when memory was scarce, and this girl was in the 
habit of going back to her app by simply clicking on the app's desktop icon. 
This happened every time she minimized the app window. So, every time she went 
to the bathroom, or talked on the phone, she would come back and click on the 
icon again, instead of looking down the bottom part of the screen and maximize 
the window. It would slow down her computer and she would raise hell (she was 
the company president's girlfriend), blaming it on the program (and me by 
extension).

So, in desperation I asked for help and a kind soul sent me the enclosed 
routine. 

To test it, put it in a prg and name it justone.prg. Then go to the VFP options 
and make this prg the startup program.

VFP will start once. The second time, it will simply quit. You can adapt it by 
giving the lcSoleWindow property the name of your exe.

Please, do not ask me to explain how it works. I never understood why a call to 
a line class is necessary but well, it works.

Regards

Rafael Copquin


--- StripMime Report -- processed MIME parts ---
multipart/mixed
  multipart/alternative
    text/plain (text body -- kept)
    text/html
  application/prg
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/f27e97dc88714df2995678897233a...@rafael
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to