Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: llyrad atsituab
  Where is llyrad atsituab?
 Tacloban City
 Philippines
 llyrad atsituab
 To: SayaeL Dean
  Where is SayaeL Dean?
 Manila
 Philippines
 SayaeL Dean
 Tags
Subject: RE: Restrict Multi-Session
Thread ID: 373408 Message ID: 373425 # Views: 49 # Ratings: 1
Version: Visual FoxPro 5 Category: VFP and .NET
Date: Friday, March 22, 2013 6:21:17 AM         
   


> Hi Experts!
> I'm having a problem about restricting users to do multi-session(run .exe many times)
> the system is build from VPF 5.0...
>
> oh btw.. every time the user opens a module(form), the systems caption(_screen.caption) change also.. :-(
>
> please help me about this problem..
>
> thanks in advance.. :-)

put this on the top of your main.prg
= myInstance([your_project_name])

put this on the buttom of your main.prg
PROCEDURE myInstance
PARAMETERS myApp
= DDESETOPTION([SAFETY],.F.)
ichannel = DDEINITIATE(myapp,[ZOOM])
IF ichannel=>0
= DDETERMINATE(ichannel)
QUIT
ENDIF
= DDESETSERVICE(myapp,[define])
= DDESETSERVICE(myapp,[execute])
= DDESETTOPIC(myapp,[],[ddezoom])
RETURN

PROCEDURE ddezoom
PARAMETER ichannel,saction,sitem,sdata,sformat,istatus
ZOOM WINDOW SCREEN NORM
RETURN

This codes prevents the exe to run again in the second time..

Thanks to Mr. Jun Tangunan he shared this code to me last year but I never use it now...

Regards:
carbcoder_02

ENTIRE THREAD

Restrict Multi-Session Posted by SayaeL Dean @ 3/22/2013 2:57:16 AM
RE: Restrict Multi-Session Posted by llyrad atsituab @ 3/22/2013 6:21:17 AM
RE: Restrict Multi-Session Posted by Jun Tangunan @ 3/22/2013 6:49:21 AM