Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2nd session foxuser does not store settings
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01027623
Message ID:
01027755
Vues:
18
Can I use the set commands to call a program to determine if a session is running and then use another resource file? Like command=prg file

>It's not a program but VFP configuration file (CONFIG.FPW) with RESOURCE= pointing to the particular foxuser.dbf
>
>>Sorry I am not responding sooner, I am in a Java class today.
>>I was trying to use on icon in the task bar. I have tried using a config prg with the below code but that does not work either. Do I have to do something different to be able to run this code in the command line file -c"file". I use quotes because there are spaces in the home directory path.
>>
>>>Chuck,
>>>
>>>It's to late to change foxuser.dbf after VFP started to affect command window and projects because VFP already read (or rather couldn't read) those settings. You can create 2 different shorcuts and point them to different config files with -C command-line swith which in turn point to different foxuser.dbf files.
>>>
>>>>I work with 2 session of VFP6. 1 for developing abd another for testing. At startup I run my own setEnvir() prg to use a diff foxuser table in another directory if a VFP session is already in use. My problem is that the 2nd session does not retain commmand window size or the last projects opened. Any Ideas on how to fix that?
>>>>I am including the code I use to set the 2nd session:
>>>>
>>>>*!*	SET RESOURCE TO "e:\program files\microsoft visual studio\vfp98\foxuser.dbf"
>>>>* use another foxuser resource file if a session of VFP is already running
>>>>LOCAL lcApplicationTitle,lnHWnd,lcFile
>>>>lcFile = "C:\Program Files\Microsoft Visual Studio\Vfp98\"
>>>>lcApplicationTitle = "VFP6-1"
>>>>
>>>>DECLARE INTEGER FindWindow IN Win32API;
>>>>STRING @lpClassName, STRING @lpWindowName
>>>>lnHWnd = FindWindow(0, @lcApplicationTitle)
>>>>
>>>>IF lnHwnd = 0
>>>>	SET RESOURCE TO (lcFile+"foxuser.dbf")
>>>>	_screen.caption = "VFP6-Dev"
>>>>ELSE
>>>>	SET RESOURCE TO (lcFile+"vfp\foxuser2.dbf")
>>>>	_screen.caption = "VFP6-Test"
>>>>ENDIF
>>>>
>>>>
>>>>
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform