开云体育

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

_screen.caption trick


Stein Goering
 

开云体育

Jim T, you mentioned that you had your system set up so that the current directory would be echoed in the VFP screen caption.? Is there associated code or config info that you could post?

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?

?


Jim Tooley
 

开云体育

Hi Stein,
?
I've been going over some code Eric showed us years ago which I've just taken for granted because it's just been there... working quietly in the background every time I start VPF.
?
Basically you need to issue:
?
_screen.caption=sys(5)+sys(2003) from the command window or somewhere.
?
What I was remembering at the meeting was that this line is in my config file at startup ... being there it only shows me were I am at startup. I've been playing with MACROS under TOOLS on the toolbar.? I set one up so that when I hit the F12 key it will refresh the _screen.caption property. The code I entered in the Macro box is:
?
_screen.caption=sys(5)+sys(2003){Enter}
?
This of course mimicks CD? but at least you know exactly where to look on the screen for the folder you are in.
?
If the macro were set up like this:??? {Enter}_screen.caption=sys(5)+sys(2003){Enter}?? then you could use the F12 key as an alternate "Enter" key and the screen.caption would be updated everytime you did something in the command window.
?
It would be nice to suppress the output that goes to the Command Window but the only properties that I can found for the Command Window are found by right-clicking in it. There doesn't seem to be a lot of controls to play with there.? Do you know how to did deeper into it? I don't think we can just run a macro on the "ENTER" key.
?
Jim
?
?

----- Original Message -----
Sent: Friday, February 20, 2004 10:04 PM
Subject: [madfox_vfp] _screen.caption trick

Jim T, you mentioned that you had your system set up so that the current directory would be echoed in the VFP screen caption.? Is there associated code or config info that you could post?

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?

?



hawkridge
 

开云体育

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


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


Cliff S
 

开云体育

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----

From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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




Stein Goering
 

开云体育

Neither can I see an option to display the default directory in the title bar, which was the original question….

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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






Cliff S
 

开云体育

The project hook code does that when the project is loaded, but it would be nice to do it when you switch between projects…

?

cliff

?

-----Original Message-----

From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 25, 2004 9:31 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

Neither can I see an option to display the default directory in the title bar, which was the original question….

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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

?

?




Eric Selje
 

Activate() doesn't do it?

-----Original Message-----
From: Cliff S <hawkridge@...>
Sent: Feb 25, 2004 11:35 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

The project hook code does that when the project is loaded, but it would be
nice to do it when you switch between projects.


Cliff S
 

No. Apparently it doesn't fire when you switch between two projects...

cliff

-----Original Message-----
From: Eric Selje [mailto:eselje@...]
Sent: Wednesday, February 25, 2004 10:48 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Activate() doesn't do it?


-----Original Message-----
From: Cliff S <hawkridge@...>
Sent: Feb 25, 2004 11:35 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

The project hook code does that when the project is loaded, but it would be
nice to do it when you switch between projects.






Yahoo! Groups Links


PJ Fernandez
 

开云体育

Try this page, it explains about using the toolbox.? There is a section for "Add In" behavior.
?
?
P.J.

-----Original Message-----
From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 25, 2004 9:31 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Neither can I see an option to display the default directory in the title bar, which was the original question….

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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







hawkridge
 

开云体育

PJ:
?
I checked this page out and can't see how it applies.? All we want to do is have the main window titlebar display the default file location, and the project hook does that without having to click on anything or right click anything.?
?

Walk In Beauty,

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

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Thursday, February 26, 2004 1:09 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Try this page, it explains about using the toolbox.? There is a section for "Add In" behavior.
?
?
P.J.
-----Original Message-----
From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 25, 2004 9:31 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Neither can I see an option to display the default directory in the title bar, which was the original question….

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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







PJ Fernandez
 

开云体育

That is true.? In this case you need to perform something to get that action.? Almost no difference from performing a prg after starting.? I think the project hook is the best solution, so far.
?
P.J.

-----Original Message-----
From: hawkridge [mailto:hawkridge@...]
Sent: Thursday, February 26, 2004 6:11 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

PJ:
?
I checked this page out and can't see how it applies.? All we want to do is have the main window titlebar display the default file location, and the project hook does that without having to click on anything or right click anything.?
?

Walk In Beauty,

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

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Thursday, February 26, 2004 1:09 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Try this page, it explains about using the toolbox.? There is a section for "Add In" behavior.
?
?
P.J.
-----Original Message-----
From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 25, 2004 9:31 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Neither can I see an option to display the default directory in the title bar, which was the original question….

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but… it still doesn’t dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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







hawkridge
 

开云体育

So I finally got this working and UL'd a small prg with notes to the files section.? Once I set the debugger into the 'always on top' frame and watched the activates, it was just regrouping and finding the correct properties to use...
?
My _screen.caption changes as I switch between projects and the path and current directory also change, cool...
?

Walk In Beauty,

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


Eric Selje
 

开云体育

I'm sorry to say that I haven't been paying very close attention to this thread.? Is the goal to make the VFP caption always reflect the current default directory?? If so, three things come to mind, but none of them are all that decent.? I was hoping you could BINDEVENT to some assign method within VFP's internals, but I don't find anything close to sys(2003)_assign().
?
1. Create a timer class and AddObject() it to _VFP.? Have that timer change the caption every, say, second or so.? The code would be like this
?
* Add a timer to the _screen object that updates the caption every second with the current folder
DEFINE CLASS tmrCaptionTimer AS Timer
?
Interval = 1000?&& Every second
?
FUNCTION Timer
?_SCREEN.Caption = SYS(2003)
ENDFUNC?
?
ENDDEFINE
?
...and then...
?
SET PROCEDURE TO (Name of prg where you put this code, or SET CLASSLIB?????if you do it visually)
_screen.AddObject("oTimerObject", "tmrCaptionTimer")
?
You could even add this stuff to your startup.
2.? Do someting similar to this, only outside of the current sesion of VFP.? This would require using some Windows API to check for running instances of VFP (we've seen code like that posted already), and then doing it from the outside.
?
3.? Create a method that you use for changing directories, and always call that rather than the CD or SET DEFA TO.??? Besides CDing, it would also update the caption.
?
Hope this helps,
?
Eric

----- Original Message -----
Sent: 2/27/2004 12:19:35 PM
Subject: RE: [madfox_vfp] _screen.caption trick

That is true.? In this case you need to perform something to get that action.? Almost no difference from performing a prg after starting.? I think the project hook is the best solution, so far.
?
P.J.
-----Original Message-----
From: hawkridge [mailto:hawkridge@...]
Sent: Thursday, February 26, 2004 6:11 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

PJ:
?
I checked this page out and can't see how it applies.? All we want to do is have the main window titlebar display the default file location, and the project hook does that without having to click on anything or right click anything.?
?

Walk In Beauty,

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

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Thursday, February 26, 2004 1:09 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Try this page, it explains about using the toolbox.? There is a section for "Add In" behavior.
?
?
P.J.
-----Original Message-----
From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 25, 2004 9:31 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

Neither can I see an option to display the default directory in the title bar, which was the original question.

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 25, 2004 9:11 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

So I just looked at this and it is cool, but it still doesnt dynamically change the environment.? What would be NICE is that clicking on a project window would automatically set the environment.

?

-----Original Message-----
From: PJ Fernandez [mailto:pjfern@...]
Sent: Wednesday, February 25, 2004 8:44 AM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

?

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







hawkridge
 

开云体育

Actually, we wanted to not only show the active directory, but control it and have it follow each project.? I posted a projecthook tweak that does this.? The idea is to have the current dir and a bunch of other things change when you change projects, even when more than one are on-screen at a time.? This projecthook does that and the projecthook.activate() does fire whenever you click?a non-active project.? So this allows changing directories, paths, whatever just by clicking or opening a project.
?
I considered a timer, but that seemed kludgy to me, and cumbersome.?I'm thinking that maybe projecthooks and bulders might be worth more scrutiny.
?

Walk In Beauty,

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

-----Original Message-----
From: Eric Selje [mailto:eselje@...]
Sent: Saturday, February 28, 2004 5:57 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

I'm sorry to say that I haven't been paying very close attention to this thread.? Is the goal to make the VFP caption always reflect the current default directory?? If so, three things come to mind, but none of them are all that decent.? I was hoping you could BINDEVENT to some assign method within VFP's internals, but I don't find anything close to sys(2003)_assign().
?
1. Create a timer class and AddObject() it to _VFP.? Have that timer change the caption every, say, second or so.? The code would be like this
?
* Add a timer to the _screen object that updates the caption every second with the current folder
DEFINE CLASS tmrCaptionTimer AS Timer
?
Interval = 1000?&& Every second
?
FUNCTION Timer
?_SCREEN.Caption = SYS(2003)
ENDFUNC?
?
ENDDEFINE
?
...and then...
?
SET PROCEDURE TO (Name of prg where you put this code, or SET CLASSLIB?????if you do it visually)
_screen.AddObject("oTimerObject", "tmrCaptionTimer")
?
You could even add this stuff to your startup.
2.? Do someting similar to this, only outside of the current sesion of VFP.? This would require using some Windows API to check for running instances of VFP (we've seen code like that posted already), and then doing it from the outside.
?
3.? Create a method that you use for changing directories, and always call that rather than the CD or SET DEFA TO.??? Besides CDing, it would also update the caption.
?
Hope this helps,
?
Eric


Eric Selje
 

开云体育

That's what I get for not paying too close attention.? I didn't like the timer idea either -- kludgy.? But I thought Activate() wasn't working.? What changed?
?
Eric
?
?

----- Original Message -----
From: hawkridge
Sent: 2/29/2004 4:26:29 PM
Subject: RE: [madfox_vfp] _screen.caption trick

Actually, we wanted to not only show the active directory, but control it and have it follow each project.? I posted a projecthook tweak that does this.? The idea is to have the current dir and a bunch of other things change when you change projects, even when more than one are on-screen at a time.? This projecthook does that and the projecthook.activate() does fire whenever you click?a non-active project.? So this allows changing directories, paths, whatever just by clicking or opening a project.
?
I considered a timer, but that seemed kludgy to me, and cumbersome.?I'm thinking that maybe projecthooks and bulders might be worth more scrutiny.
?

Walk In Beauty,

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

-----Original Message-----
From: Eric Selje [mailto:eselje@...]
Sent: Saturday, February 28, 2004 5:57 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

I'm sorry to say that I haven't been paying very close attention to this thread.? Is the goal to make the VFP caption always reflect the current default directory?? If so, three things come to mind, but none of them are all that decent.? I was hoping you could BINDEVENT to some assign method within VFP's internals, but I don't find anything close to sys(2003)_assign().
?
1. Create a timer class and AddObject() it to _VFP.? Have that timer change the caption every, say, second or so.? The code would be like this
?
* Add a timer to the _screen object that updates the caption every second with the current folder
DEFINE CLASS tmrCaptionTimer AS Timer
?
Interval = 1000?&& Every second
?
FUNCTION Timer
?_SCREEN.Caption = SYS(2003)
ENDFUNC?
?
ENDDEFINE
?
...and then...
?
SET PROCEDURE TO (Name of prg where you put this code, or SET CLASSLIB?????if you do it visually)
_screen.AddObject("oTimerObject", "tmrCaptionTimer")
?
You could even add this stuff to your startup.
2.? Do someting similar to this, only outside of the current sesion of VFP.? This would require using some Windows API to check for running instances of VFP (we've seen code like that posted already), and then doing it from the outside.
?
3.? Create a method that you use for changing directories, and always call that rather than the CD or SET DEFA TO.??? Besides CDing, it would also update the caption.
?
Hope this helps,
?
Eric


hawkridge
 

开云体育

I think it was 'user stupidity' (on my part).
?

Walk In Beauty,

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

-----Original Message-----
From: Eric Selje [mailto:eselje@...]
Sent: Sunday, February 29, 2004 4:46 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

That's what I get for not paying too close attention.? I didn't like the timer idea either -- kludgy.? But I thought Activate() wasn't working.? What changed?
?
Eric
?
?
----- Original Message -----
From: hawkridge
Sent: 2/29/2004 4:26:29 PM
Subject: RE: [madfox_vfp] _screen.caption trick

Actually, we wanted to not only show the active directory, but control it and have it follow each project.? I posted a projecthook tweak that does this.? The idea is to have the current dir and a bunch of other things change when you change projects, even when more than one are on-screen at a time.? This projecthook does that and the projecthook.activate() does fire whenever you click?a non-active project.? So this allows changing directories, paths, whatever just by clicking or opening a project.
?
I considered a timer, but that seemed kludgy to me, and cumbersome.?I'm thinking that maybe projecthooks and bulders might be worth more scrutiny.
?

Walk In Beauty,

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

-----Original Message-----
From: Eric Selje [mailto:eselje@...]
Sent: Saturday, February 28, 2004 5:57 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] _screen.caption trick

I'm sorry to say that I haven't been paying very close attention to this thread.? Is the goal to make the VFP caption always reflect the current default directory?? If so, three things come to mind, but none of them are all that decent.? I was hoping you could BINDEVENT to some assign method within VFP's internals, but I don't find anything close to sys(2003)_assign().
?
1. Create a timer class and AddObject() it to _VFP.? Have that timer change the caption every, say, second or so.? The code would be like this
?
* Add a timer to the _screen object that updates the caption every second with the current folder
DEFINE CLASS tmrCaptionTimer AS Timer
?
Interval = 1000?&& Every second
?
FUNCTION Timer
?_SCREEN.Caption = SYS(2003)
ENDFUNC?
?
ENDDEFINE
?
...and then...
?
SET PROCEDURE TO (Name of prg where you put this code, or SET CLASSLIB?????if you do it visually)
_screen.AddObject("oTimerObject", "tmrCaptionTimer")
?
You could even add this stuff to your startup.
2.? Do someting similar to this, only outside of the current sesion of VFP.? This would require using some Windows API to check for running instances of VFP (we've seen code like that posted already), and then doing it from the outside.
?
3.? Create a method that you use for changing directories, and always call that rather than the CD or SET DEFA TO.??? Besides CDing, it would also update the caption.
?
Hope this helps,
?
Eric