Image "Picture" property question 
Author Message
 Image "Picture" property question

I have added an image control to my form so that i can output a small GIF
picture. This gif will be included in the project.  When i set the "picture"
property of the image control to my file, the path of the file is stored in
the property (something like "C:\app\pic1.gif").

My concern is will the saving of this path be a problem when I build an exe
and users install the app into a folder of their choice on their PCs?  Is
VFP smart enough to resolve this "issue"?

I have tried just entering just the file name ("pic1.gif") in the "picture"
property but after saving the form and editing it again, the image is gone
and the "picture" property value is "C:\app".

TIA



Sat, 16 Nov 2002 03:00:00 GMT  
 Image "Picture" property question
To be honest, I've never tried it, but you can try assigning the image in
the INIT of the form that the image is on, something like:

THISFORM.Image1.PICTURE = "myfile.gif"

I do know that when I include tables in the project, I can open them
without a path, using something simple like:

USE mytable SHARED

It's worth a try.

- John

Quote:

>I have added an image control to my form so that i can output a small GIF
>picture. This gif will be included in the project.  When i set the "picture"
>property of the image control to my file, the path of the file is stored in
>the property (something like "C:\app\pic1.gif").

>My concern is will the saving of this path be a problem when I build an exe
>and users install the app into a folder of their choice on their PCs?  Is
>VFP smart enough to resolve this "issue"?

>I have tried just entering just the file name ("pic1.gif") in the "picture"
>property but after saving the form and editing it again, the image is gone
>and the "picture" property value is "C:\app".

>TIA

--
Free Email, Usenet, and $1000 Giveaway -- http://www.covix.com


Sat, 16 Nov 2002 03:00:00 GMT  
 Image "Picture" property question
There are a couple of ways to handle it.
you can mark the gif file Include in your project and it will be rolled into
the exe for ever. The users will never see the file.  You can add Graphics
sub-folder in the project folder, along with the Data and Reports and so on
folders. Include this folder in a SET PATH TO command.
-Anders


Quote:
> I have added an image control to my form so that i can output a small GIF
> picture. This gif will be included in the project.  When i set the
"picture"
> property of the image control to my file, the path of the file is stored
in
> the property (something like "C:\app\pic1.gif").

> My concern is will the saving of this path be a problem when I build an
exe
> and users install the app into a folder of their choice on their PCs?  Is
> VFP smart enough to resolve this "issue"?

> I have tried just entering just the file name ("pic1.gif") in the
"picture"
> property but after saving the form and editing it again, the image is gone
> and the "picture" property value is "C:\app".

> TIA



Sun, 17 Nov 2002 03:00:00 GMT  
 Image "Picture" property question
That's what I do.  I have an E drive on my computer.  I issue a

set path to bitmaps

where e:\myapp\bitmaps  contains all the bitmap icons.  VFP then puts the
e:\myapp\bitmaps in the property.  When I have loaded the exe on computers
without an E drive, it does not seem to matter at all.  The important thing is
to include the bmp files in your project so they get compiled into the exe file
then it doesn't matter whether you use set path or not.  VFP will first look in
the exe for the bitmap before going off to the path.

Quote:
>Subject: Re: Image "Picture" property question

>Date: 5/30/00 5:11 PM Pacific Daylight Time

>There are a couple of ways to handle it.
>you can mark the gif file Include in your project and it will be rolled into
>the exe for ever. The users will never see the file.  You can add Graphics
>sub-folder in the project folder, along with the Data and Reports and so on
>folders. Include this folder in a SET PATH TO command.
>-Anders

Mike


Sun, 17 Nov 2002 03:00:00 GMT  
 Image "Picture" property question

If you have a project that you are distributing include a MAIN.PRG file
that will be used to initilize your environment. MAIN.PRG needs to be
the main start file when building the project.

*INCLUDE THIS IN MAIN.PRG
*findout where you started and set that directory as the default
 SET DEFAULT TO SUBSTR(PROGRAM(),RAT('\',PROGRAM()))
*add additional paths to search, in this case subfolders
 SET PATH TO bin,data,images\buttons,images\banners,images\employees

*IN THE FORMS INIT PROPERTY
 thisform.image1.picture = 'myfile.gif'

Dan

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 18 Nov 2002 03:00:00 GMT  
 Image "Picture" property question
Daniel
That's not reliable unless you add FULLPATH()
FULLPATH(SUBSTR(PROGRAM(),RAT('\',PROGRAM()))))
which is the same as
ADDBS(JUSTPATH(SYS(16)))
-Anders


Quote:

> If you have a project that you are distributing include a MAIN.PRG file
> that will be used to initilize your environment. MAIN.PRG needs to be
> the main start file when building the project.

> *INCLUDE THIS IN MAIN.PRG
> *findout where you started and set that directory as the default
>  SET DEFAULT TO SUBSTR(PROGRAM(),RAT('\',PROGRAM()))
> *add additional paths to search, in this case subfolders
>  SET PATH TO bin,data,images\buttons,images\banners,images\employees

> *IN THE FORMS INIT PROPERTY
>  thisform.image1.picture = 'myfile.gif'

> Dan

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Mon, 18 Nov 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. "SetAll" Property Question

2. String too long in PICTURE "@M"

3. PICTURE "@2K"? (FoxPro)

4. Help - "Picture too big..."

5. VFP5 _screen= "my background picture" help

6. FYI: Repeatedly setting the image controls .picture property causes "Pool paged Bytes" to grow

7. Simple "VIEW" question

8. "Working ...." Quick QUESTION

9. "Begin/End Transaction" Question

10. question about "Foxpro for windows"

11. Question about "ON ERROR".

12. grid.setall("DynamicBackColor") question

 

 
Powered by phpBB® Forum Software