¿ªÔÆÌåÓý

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

Re: _screen.caption trick

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







Re: _screen.caption trick

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


Re: _screen.caption trick

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







Re: _screen.caption trick

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







Re: _screen.caption trick

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







Re: _screen.caption trick

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


Re: _screen.caption trick

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.


Re: _screen.caption trick

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

?

?




Re: _screen.caption trick

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






Re: _screen.caption trick

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




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


Re: _screen.caption trick

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


Re: _screen.caption trick

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

?

?



Re: February Meeting

 

¿ªÔÆÌåÓý

Stein:
?
Thanks for the tip.? I downloaded both and on initial use - agree that PSPad is better.? I'm doing some Java stuff and needed something more than NOTEPAD.? Thanks!
?
Peter D.

As discussed in last meeting:
4.? TextPad editor for Java programming.
http://www.textpad.com/download/#downloads

I noticed that this product was also featured in Jan 04 Foxpro Advisor tips
section -- how to configure textpad to work with VFP.?

Having said that, my personal choice remains freeware editor PSPad.
http://www.pspad.com/index_en.html
I still use integrated editor for VFP work, but have my system configured so
PSPad replaces Notepad as default editor.


--stein

Stein Goering
Arbutus Computer Services
17494 Merry Hill Rd
Richland Center, WI? 53581

608.538.3820


Re: February Meeting

Stein Goering
 

As discussed in last meeting:
4. TextPad editor for Java programming.


I noticed that this product was also featured in Jan 04 Foxpro Advisor tips
section -- how to configure textpad to work with VFP.

Having said that, my personal choice remains freeware editor PSPad.

I still use integrated editor for VFP work, but have my system configured so
PSPad replaces Notepad as default editor.


--stein

Stein Goering
Arbutus Computer Services
17494 Merry Hill Rd
Richland Center, WI 53581

608.538.3820


_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

?

?


Re: Excel...l

hawkridge
 

I really believe we tried every which way for those params and nothing
worked. I banged this little example out in two minutes no problem. I am
much more likely to believe that PJ has done some things to his workstation
to make us all look like beginners again.

Actually, the energy in the cosmos must be WIERD. I was working REAL LATE
at a client network tonight and all of a sudden the network just went
bonkers. I was burning a CD across the wire and it just stopped for a
minute, then the buffer filled up again, then it would stop. I went to look
at the switches (2 10/100 switches and a 10/100 hub) and both switches were
just banging every port, the hub was quiet. Only the print servers, file
server, and my tech system were alive - I have no idea what was going on
other than maybe there were aliens on the roof - maybe PJ has some aliens in
the back room there too.

Walk In Beauty,

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

-----Original Message-----
From: Stein Goering [mailto:sgoering@...]
Sent: Wednesday, February 18, 2004 10:52 PM
To: madfox_vfp@...
Subject: RE: [madfox_vfp] Excel...l


So the only thing needed to make our code of last night work was to change
the Pastespecial params to logicals???
Yes, I tried it; it is true. Change that line to:
loSheet.Range("a5").PasteSpecial(-4104,-4142,.F.,.T.)
And it works.

But I SWEAR we did that last night. That's what we started with. We only
went to 0, 1 when the logicals didn't work. Didn't we? What was in that
Coke? Or was it the cake?

--stein

Stein Goering
Arbutus Computer Services
17494 Merry Hill Rd
Richland Center, WI 53581

608.538.3820

-----Original Message-----
From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 18, 2004 10:16 AM
To: madfox_vfp@...
Subject: [madfox_vfp] Excel...l

This code runs no problemo... Output is as expected and no errors.



*** XTest.prg
***
*** finish up from madfox 17 Feb 04 meeting
***


SET STEP ON

oX=CREATEOBJECT("excel.application")
oX.Visible=.t.
oX.Workbooks.Add(1)
oX.range('a1').Value=1
oX.range('b1').Value=2
oX.Range('a4').Select
oX.Range('a1:b1').Copy
oX.Range('a4').PasteSpecial(-4104,-4142,.f.,.t.)
WAIT WINDOW 'did it work...?'
oX.activeworkbook.saved=.t.
oX.application.quit


*

Walk In Beauty,

cliff





Yahoo! Groups Links









Yahoo! Groups Links


Re: VFP version issues

Stein Goering
 

¿ªÔÆÌåÓý


Thanks but that wasn¡¯t it.? I had run into the GROUP BY issue in previous upgrades to VFP 8, so had already added the SET ENGINEBEHAVIOR clause.? And the areas where the odd behavior showed up often did not even involve a SELECT stmt of any sort¡­.

?

--stein

?

Stein Goering

Arbutus Computer Services

17494 Merry Hill Rd

Richland Center, WI? 53581

?

608.538.3820

?


From: Foxprotalk@... [mailto:Foxprotalk@...]
Sent: Friday, February 13, 2004 11:58 PM
To: madfox_vfp@...
Subject: Re: [madfox_vfp] VFP version issues

I haven't used codemine in years.? But, the biggest gotcha in my vfp8 conversion of vfp7 apps had to do with SQL statements.? Namely -?GROUP BY clause has a requirement in VFP8 that all the columns have to be restated.? The quick way around this - and a quick suggestion to you is to include:

?

SET ENGINEBEHAVIOR to 70? at the top of your app

or

ENGINEBEHAVIOR=70? in your config.fpw

?

It's worth a try

?

Peter

?

madfox_vfp-unsubscribe@...
?

¡¤? Your use of Yahoo! Groups is subject to the .


Re: Excel...l

Stein Goering
 

So the only thing needed to make our code of last night work was to change
the Pastespecial params to logicals???
Yes, I tried it; it is true. Change that line to:
loSheet.Range("a5").PasteSpecial(-4104,-4142,.F.,.T.)
And it works.

But I SWEAR we did that last night. That's what we started with. We only
went to 0, 1 when the logicals didn't work. Didn't we? What was in that
Coke? Or was it the cake?

--stein

Stein Goering
Arbutus Computer Services
17494 Merry Hill Rd
Richland Center, WI 53581

608.538.3820

-----Original Message-----
From: Cliff S [mailto:hawkridge@...]
Sent: Wednesday, February 18, 2004 10:16 AM
To: madfox_vfp@...
Subject: [madfox_vfp] Excel...l

This code runs no problemo... Output is as expected and no errors.



*** XTest.prg
***
*** finish up from madfox 17 Feb 04 meeting
***


SET STEP ON

oX=CREATEOBJECT("excel.application")
oX.Visible=.t.
oX.Workbooks.Add(1)
oX.range('a1').Value=1
oX.range('b1').Value=2
oX.Range('a4').Select
oX.Range('a1:b1').Copy
oX.Range('a4').PasteSpecial(-4104,-4142,.f.,.t.)
WAIT WINDOW 'did it work...?'
oX.activeworkbook.saved=.t.
oX.application.quit


*

Walk In Beauty,

cliff





Yahoo! Groups Links


.Net Training

Eric Selje
 

I don?€?t know how far and wide our announcements go, but the Michigan user groups are once again sponsoring a full day training class in Lansing, MI. We began work on this before this discussion started, so we didn?€?t think to mention it to anyone outside the Michigan user groups. We are bringing in Kevin McNeish to conduct a class on .NET. The class will be Saturday, May 1, and the cost is $125 for user group members, $150 for others. If anyone wants more information, please let me know.

Mike Potjer
GRAFUG President


potjerm@...