Home > Archive > FoxPro Setup > April 2005 > How to change the caption and/or icon of VFP 9?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to change the caption and/or icon of VFP 9?
Peter

2005-04-07, 8:05 pm

I have installed both VFP 8 and VFP 9. They have the same icon and caption.
So, it is hard to tell which version I'm running. How can I change the icon?
How can I change the caption of VFP so it always use that caption when it
starts?

Thanks.
Stefan Wuebbe

2005-04-07, 8:05 pm

You can assign the _screen properties
_screen.Caption = "my project"
_screen.Icon = GetPict() && for example


hth
-Stefan


--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


"Peter" <Peter@discussions.microsoft.com> schrieb im Newsbeitrag
news:211408A6-E224-4C1F-B06C- 4DB1FF7335DE@microso
ft.com...
>I have installed both VFP 8 and VFP 9. They have the same icon and caption.
> So, it is hard to tell which version I'm running. How can I change the icon?
> How can I change the caption of VFP so it always use that caption when it
> starts?
>
> Thanks.


Peter

2005-04-07, 8:05 pm

Hi Stefan,

Thanks for the reply. I guess you mean to put those lines in a
configuration file where VFP9.exe or VFP8.exe is located.

Does the configuration file need to be named config.fpw?

Peter

"Stefan Wuebbe" wrote:

> You can assign the _screen properties
> _screen.Caption = "my project"
> _screen.Icon = GetPict() && for example
>
>
> hth
> -Stefan
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>
>
> "Peter" <Peter@discussions.microsoft.com> schrieb im Newsbeitrag
> news:211408A6-E224-4C1F-B06C- 4DB1FF7335DE@microso
ft.com...
>
>

Fred Taylor

2005-04-07, 8:05 pm

No, you can put those lines in your main .PRG program.

--
Fred
Microsoft Visual FoxPro MVP


"Peter" <Peter@discussions.microsoft.com> wrote in message
news:C95FCB14-C2E9-4CBA-B090- 17C2A18261E9@microso
ft.com...[color=darkred]
> Hi Stefan,
>
> Thanks for the reply. I guess you mean to put those lines in a
> configuration file where VFP9.exe or VFP8.exe is located.
>
> Does the configuration file need to be named config.fpw?
>
> Peter
>
> "Stefan Wuebbe" wrote:
>


Stefan Wuebbe

2005-04-07, 8:05 pm

HI peter,

As Fred pointed out, that syntax would run in any VFP code, prg,
method, whatever.

As for the config.fpw option, syntax is different there - for example,
you can set the Title in a config.fpw
title = my project
(w/o quotes).
But I think you can not change the icon that way.

OTOH, the actual advantage of a config.fpw is that it is evaluated
very early, i.e. long before your "main.prg" code jumps in and also
before _screen gets visible and foxuser.* is created.
So IMO it's useful to do only a few things there at runtime, maybe
just
screen=off
resource=off

That way (you won't get a useless resource file on a customer's box
and) _screen won't be visible until you tell it to be, i.e. later in your
code, probably after having designed _screen to meet your specs.
* "main" startup pseudo code
&& _screen is invisible yet by config.fpw line
With _screen
.Icon = 'your.picture'
.Title = "xy"
&& .BackgroundColor = RGB(255,0,0) &&etc.. And finally:
.Visible = .T. && m.yourChoice, depending on mainForm.ShowWindow
EndWith

As for the file name, if you do want to use a "config.fpw" file, you can
use any name and use the -C commandline switch,
e.g. call it "yourConfig.file" and have a desktop shortcut pointing to
x:\theFolder\your.exe -CyourConfig.File

or, with Windows' "long" file/path names
"x:\some folder\extended name.exe" -CyourConfig.file

You wouldn't need a -C parameter by using the default name.
(If you include a config.fpw via project manager, you don't need
to ship it separately)


hth
-Stefan


--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------

"Peter" <Peter@discussions.microsoft.com> schrieb im Newsbeitrag
news:C95FCB14-C2E9-4CBA-B090- 17C2A18261E9@microso
ft.com...[color=darkred]
> Hi Stefan,
>
> Thanks for the reply. I guess you mean to put those lines in a
> configuration file where VFP9.exe or VFP8.exe is located.
>
> Does the configuration file need to be named config.fpw?
>
> Peter
>
> "Stefan Wuebbe" wrote:
>

DJ Hunt

2005-04-07, 8:05 pm

"Peter" <Peter@discussions.microsoft.com> wrote in message
news:C95FCB14-C2E9-4CBA-B090- 17C2A18261E9@microso
ft.com...

Why not just rename the icon, and the flyover text so that you don't get
them confused?

--
The Hacker's Guide to GoldMine 6.7 - http://www.dj-hunt.com/hg_toc3.htm

One-on-One GoldMine Technical Support ( Fee Based Service ) -
http://www.dj-hunt.com/gm_tech_support.htm

DJ Hunt

Phone: (978)342-3333
Email: DJ.Hunt@DJ-Hunt.com


Cindy Winegarden

2005-04-07, 8:05 pm

Hi Peter,

I assume you're talking about the VFP IDE and not a running application. You
can put code in a startup program (Stefan showed code that will do the job).

I have several instances of VFP running at the same time with different
projects. Sometimes I do something as simple as typing _Screen.Caption = "My
Project" in the Command window. Other times I've used a project hook to
automatically perform that service when a project is open. In the Tools >
Options > Projects > Project Class I've set the default Project class a
ProjectHook class with the following code in the Init():

LOCAL loProject

_VFP.Caption = ""

FOR EACH loProject IN _VFP.Projects
_VFP.Caption = JUSTSTEM(loProject.Name) + ", " + _VFP.Caption
ENDFOR

_VFP.Caption = SUBSTR(_VFP.Caption, 1, LEN(_VFP.Caption) - 2)


--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
cindy_winegarden@msn
.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden


"Peter" <Peter@discussions.microsoft.com> wrote in message
news:211408A6-E224-4C1F-B06C- 4DB1FF7335DE@microso
ft.com...
>I have installed both VFP 8 and VFP 9. They have the same icon and
>caption.
> So, it is hard to tell which version I'm running. How can I change the
> icon?
> How can I change the caption of VFP so it always use that caption when it
> starts?
>
> Thanks.



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com