Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Icons
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Icons
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01059033
Message ID:
01060014
Views:
12
>>>Hi All.
>>>
>>>I have in the past always included icons and bitmaps required by my app in the project and hence in the exe file itself. Now I am thinking of putting all required icons and bitmaps into a standalone dbf file. The purpose would be that each record in this file could contain a different set of icons and I could then change the appearance of the app depending on which record I choose to get the icons and bitmaps from.
>>>
>>>Is there any downside to this? Would there be a performance hit for getting the icons from this file rather than having them in the exe file? Would this be worse when running over a network?
>>>
>>
>>Jos,
>>
>>Yes, there is a performance hit. Does it matter? It's impossible to tell.
>>
>>The question is, "Why do you want to do this?"
>
>Hi George. The reason is that it's an easy way to allow a user to choose a theme of icons and bitmaps to use. :)

Hi Jos,

You might also wish to consider one of these two approaches:

a) keep your sets of icons/bitmaps, using a common naming convention for these icons/bitmaps, in separately named PKZIP files in a known location; then, when the user chooses a theme (say, from a ComboBox you build of these names) extract them into a common folder/known location that your app always looks in for these files.

b) keep the sets in folders underneath a master folder, and use an entry in a configuration DBF to point the app to the desired folder/set of graphics. Your app would have to look at this DBF entry at runtime to assign the correct location and file name of the desired icon/bitmap (this is not difficult, and is the way most of my apps currently behave).

Both these options would give you the behaviour you wished with 1) very little extra coding and 2) a negligible, if any, performance hit.

Just a thought. I actually have some code that does this -- somewhere (g) -- that I could probably dig up if you need it.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform