Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Setup / March 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter - 17 Mar 2005 23:19 GMT
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 - 18 Mar 2005 13:02 GMT
You can assign the _screen properties
   _screen.Caption = "my project"
   _screen.Icon = GetPict()     && for example

hth
-Stefan

Signature

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

>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 - 18 Mar 2005 19:23 GMT
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

> You can assign the _screen properties
>     _screen.Caption = "my project"
[quoted text clipped - 9 lines]
> >
> > Thanks.
Fred Taylor - 19 Mar 2005 02:06 GMT
No, you can put those lines in your main .PRG program.

Signature

Fred
Microsoft Visual FoxPro MVP

> Hi Stefan,
>
[quoted text clipped - 21 lines]
>> >
>> > Thanks.
Stefan Wuebbe - 19 Mar 2005 10:04 GMT
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

Signature

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

> Hi Stefan,
>
[quoted text clipped - 18 lines]
>> >
>> > Thanks.
DJ Hunt - 20 Mar 2005 14:39 GMT
Why not just rename the icon, and the flyover text so that you don't get
them confused?

Signature

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 - 20 Mar 2005 22:31 GMT
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)

Signature

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

>I have installed both VFP 8 and VFP 9.  They have the same icon and
>caption.
[quoted text clipped - 4 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.