Keyboard Shortcuts
Likes
- MadFox
- Messages
Search
New Hentzenwerke Book
Eric Selje
(Probably the last one. Sorry if you got this separately)
The long-awaited "Build Your Own Framework with Visual FoxPro" by Ken Chazotte, edited by Joe Johnston, is at the printer and will be shipping before the end of March. Sample chapters, detailed table of contents, and index available at You can pre-order your copy now and not only save a bundle (40%) off the list price of $49.95 but also download the ebook in PDF format and the source code immediately. Gosh! The book will be shipped to you automatically when it arrives from the printer. Price if ordered by midnight (CST) Thursday, March 11: $29.95 Price if ordered by midnight (CST) Monday, March 22, $39.95 Notes: - Discounts available only for printed book orders placed online. - Additional discounts (like Preferred Customer) also apply. Since this is the first VFP book we've released in a while, we're also offering an additional 40% discount off of every other printed book in our catalog through midnight, Thursday, March 11. Now is a great time to stock up on multiple VFP books! --> THE ONLINE ORDER FORM ALREADY REFLECTS THESE DISCOUNTS! <-- To order: Whil |
Consulting Opportunity
Eric Selje
I received this request from a friend in Madison yesterday. He's wants a custom database app for his real estate appraisal business:
"Please have some of your contacts get a hold of us.. We are not set on any particular DB Application or anything yet, just have ideas of what we want. Please have whoever contact me at sean@... or 608-662-1964 (office) Sean Knick" |
Fw: FUDG Presents March 9th Double Header
Eric Selje
From: "bill.drew" <bill.drew@...>
Sent: Mar 2, 2004 10:07 PM To: eselje@... Subject: FUDG Presents March 9th Double Header 1) Sell Yourself -- Lessons from 30 years in the Trenches & 2) Anatomy of an Application Launcher/Updater Si Skidmore presents a full palatte of consulting wisdom. He'll also give us a quick tour of a customizable manufacturing package that makes room for the consultant to add value. Bill Drew will present the Launcher program. Download the white paper at www.chicagofudg.com/downloads/Launcher.zip It highlights basic programming concepts which form the building blocks of an advanced application. Be there or be square. Tues March 9th 5:30 53 W Jackson Suite 826. |
Re: _screen.caption trick
hawkridge
开云体育I think it
was 'user stupidity' (on my part).
?
Walk In Beauty, Cliff Smith
|
Re: _screen.caption trick
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
?
?
|
Re: _screen.caption trick
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
|
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
|
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 |
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.
|
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
|
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.
|
Re: _screen.caption trick
Cliff S
No. Apparently it doesn't fire when you switch between two projects...
toggle quoted message
Show quoted text
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?
toggle quoted message
Show quoted text
-----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@...]
? 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----- ? Which version are we talking here?? Because VFP 8.0 has that on the environment option of the task pane. ? P.J -----Original
Message----- 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 ? LOCAL cDefaultSearch ? this.cDefaultFilePath = _vfp.DefaultFilePath this.oThisProject =
_vfp.ActiveProject 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 ? ?
|
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----- ? Which version are we talking here?? Because VFP 8.0 has that on the environment option of the task pane. ? P.J -----Original
Message----- 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 ? LOCAL cDefaultSearch ? this.cDefaultFilePath = _vfp.DefaultFilePath this.oThisProject =
_vfp.ActiveProject 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
|
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----- 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 ? LOCAL cDefaultSearch ? this.cDefaultFilePath = _vfp.DefaultFilePath this.oThisProject =
_vfp.ActiveProject 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
|
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
|
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 |
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
?
?
|
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: |