Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mass Form Icon Update

0 views
Skip to first unread message

Gary Patterson

unread,
Mar 4, 1999, 3:00:00 AM3/4/99
to
I have about 500 forms that need a new icon and I really don't want to open
their 175 projects and do this by hand. I normally use a multiple-file
search-and-replace program when I need to do these kind of changes; but

Icon = "newicon.ico"

does not work in my form header. If I add the icon by hand, it gets written
into an FRX file and that is no good for globally changing 500 forms. In
code, I would use

Let frmGeneric.Icon = LoadPicture("newicon.ico")

but I would like to imbed the icons directly into the form files. Hmmm. Any
ideas?

Thanks in advance,

Gary Patterson
garypa...@iname.com


Larry Serflaten

unread,
Mar 5, 1999, 3:00:00 AM3/5/99
to
You can change the icon by altering the Icon property in the forms
FRM file. Instead of using the ICO file, start a new project
(Form1 is created by default) set the forms icon property to your
new icon and save the form (in a SAFE place) as NEWICON.FRM

Now look at the Form's FRM file and find the line for the Icon.
Change the filename to include its full path from the root on down:

From:
Icon = "newicon.frx":0000

To:
Icon = "c:\subdir1\subdir2\newicon.frx":0000


You then have a line you can add to any of your other form files, in any
directory. Be advised, unless you resave each form, in each project,
they will continue to look for your NEWICON.FRX file. Perhaps, if you
are changing these same icons often, this will work to your benefit...

LFS

Jonathan Allen

unread,
Mar 5, 1999, 3:00:00 AM3/5/99
to
If you can get away with it, I would recommend using a shared resource file.
This way you could edit one file only. Unfortunately you would still have to
re-compile everything.

Greywolf Ghost

Larry Serflaten <serf...@mail.usinternet.com> wrote in message
news:36DFD4...@mail.usinternet.com...

Gary Patterson

unread,
Mar 7, 1999, 3:00:00 AM3/7/99
to
Just a followup... Thanks for everyone's help. I ended up tagging a form in
the startup process and grabbing its icon. I then store that icon in the
project's GlobalMultiUse in-process server as an "object" property. Before
each form is displayed, the server sets the form's icon property (along with
size, position, etc.) at runtime. There might have been a better way; but
the show goes on. Maybe I will do it different next time.

Gary
garypa...@iname.com


0 new messages