Re: Use of Resource File
- From: "Lance Wynn" <LanceWynn@xxxxxxxxxxxxxxxx>
- Date: Mon, 24 Jul 2006 18:37:06 -0600
You could just name the image something like 'MainImage.bmp', and store the
text in a small text file 'MainText.txt', or ini file in your app's root
folder. Then, when the app runs, load the image into the picture box, and
set the text of the heading to the text in the file.
On either user's machine, all you'd need to do is change the bmp, and the
text file accordingly.
"Marv Wade" <NG@xxxxxxxxxxxxxxx> wrote in message
news:OYVbpW3rGHA.4856@xxxxxxxxxxxxxxxxxxxxxxx
Yes, I understand that. But I only want to have one exe file to content
with even though there are two separate users. What I had thought to use
the Resource file to store two pictures and headings- one for each user -
and am looking for some means of "localizing" the program so that the
correct picture and label text appears for that user. I need some method
of creating a trigger that tells the program which picture and test to be
used for each user.
I hope this makes some sense.
Marv
"J French" <erewhon@xxxxxxxxxx> wrote in message
news:44c46fa3.317141915@xxxxxxxxxxxxxxxxxxxxxxx
On Sun, 23 Jul 2006 21:12:40 -0400, "Marv Wade" <NG@xxxxxxxxxxxxxxx>
wrote:
I am strictly a hobbyist user of VB. A couple of years ago I developed a
program for a friend that runs a travel agency to do all of the record
keeping , updating of trip, travelers, mailings, payment processing, etc.
It works just fine.
Recently, another friend asked if they could also use it. The main menu
page
of the program has a picture of the owner of the travel agency and the
heading is the company name. I want to be able to customize this to
reflect
both users.
From what I have been able to determine, it appears that the use of aresource file to store both pictures and heading should do just fine.
However, I have not been able to determine what triggers the program to
use
which picture and label text. Most of the examples I have found use some
type of option when the program starts to determine who is using the
program. I could do this but I do not want each user to be able to select
the other's picture or label text.
At design time, when you put a Picture into a Form or Picturebox, the
Picture is added to the Form's FRX file which gets compiled into the
EXE as a 'resource'
Unless one is doing major fiddling one might as well utilize that
little feature.
In cases where I need something like a glorified Image List, I just
use a UserControl as an invisible repository.
.
- References:
- Use of Resource File
- From: Marv Wade
- Re: Use of Resource File
- From: J French
- Re: Use of Resource File
- From: Marv Wade
- Use of Resource File
- Prev by Date: Re: Setup question before installing VS 2005
- Next by Date: Re: Can Dir handle different file types?
- Previous by thread: Re: Use of Resource File
- Next by thread: Re: Use of Resource File
- Index(es):
Relevant Pages
|