¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: _screen.caption trick


PJ Fernandez
 

¿ªÔÆÌåÓý

Which version are we talking here?? Because VFP 8.0 has that on the environment option of the task pane.
?
P.J

-----Original Message-----
From: hawkridge [mailto:hawkridge@...]
Sent: Tuesday, February 24, 2004 2:13 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

So here is a partial solution.? This is what I put in the activate() of my_projecthook class, cDefaultFilePath & oThisProject are custom properties.? This sets the default file path and all the path search crap for my standard project layout.? Also puts the info in the screen caption (just added this after our meeting).
?
This is only a partial solution as far as I can see as it does not refresh.? If there were a way setting up an event whenever a project becomes active, then we could readjust the paths and caption when more than one project is open at a time.? Unfortunately, the docs say I can't bind to a method/property in _VFP or we could do an update with BINDEVENTS().
?
?
* set default path to project home directory each time the project is activated
* show the developer the path in the main screen titlebar
?
LOCAL cDefaultSearch
?
this.cDefaultFilePath = _vfp.DefaultFilePath
this.oThisProject = _vfp.ActiveProject
cDefaultSearch?= '.;.\data;.\lib;.\prg;.\include;.\forms;.\menus;.\reports;' + ;
????? 'd:\hawkridge\system\visual studio\vfp\my class libraries;' + ;
????? 'd:\hawkridge\system\visual studio\vfp\include'
CD (this.cDefaultFilePath)
SET DEFAULT TO (this.cDefaultFilePath)
SET PATH TO (cDefaultSearch)
_Screen.Caption = 'DEFAULT FILE PATH = ' +?this.cDefaultFilePath
DODEFAULT()
RETURN
Soooo..... if anyone can figure out how to raise an event whenever a project becomes active, then we could automate this, or maybe hook the ActiveProject.Refresh().

Walk In Beauty,

Cliff Smith
hawkridge@... / 608 647-2366

Join [email protected] to automatically receive all group messages.