Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logo on form 1

Status
Not open for further replies.

button71

Programmer
Nov 8, 2006
69
AU
I have a manually coded form on which I wish to place an icon.

I have used
Code:
ADD OBJECT  img as image WITH ;
Top = 40, ;
Left = 70, ;
Height = 60, ;
Width = 60, ;
Picture = full development path to logo file,;
Name = "img"

It works OK in the dev environment but on other machines in which I have the logo file in the program folder I get the img placeholder.

How do I reference the logo file in the code?

Installation folder is variable for a user.

Regards

Bryan




 
In your code, don't refer to the full path of the logo file. Just set the Picture property to the basic filename.

When you build the project, be sure that the logo file has been added to the project and not flagged as excluded. That way, the file will be bound into the EXE, and the application will always find it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,

In looking at the Other Tab in the Project I see the two logo and icon files I have used in the project already there.

I recompiled the form.prg and Built an exe.

I deleted the image files from the runtime project folder.

When the app runs the icon shows on the Title Bar but the logo still shows as missing X.

I'm using VFP6 - does that make a difference?

What else can I try please

Regards

William

Regards
 
William,

Did you remember to change your code, to remove the path from the "Picture = " line?

Also, are sure the image is properly included in the project? When you look at the image in the project window (on the Other tab), there should not be an "exclude" icon against it; this is a little circle with a diagonal line inside it).

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
As you say the logo appears as icon in the titlebar, I assume you use an .ico file. AFAIR VFP6 Image Control does not support ico files.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top