ini picture Nightmare

Greg8537481665
08-31-2003, 08:49 PM
Could someone be kind enough to tell me whats wrong with this code:


CmdFavorite1.Caption = ReadFromIniFile(LpFileName, "Favorite1", "UrlName", CmdFavorite1.Caption)

CmdFavorite1.ToolTipText = ReadFromIniFile(LpFileName, "Favorite1", "UrlAddress", CmdFavorite1.ToolTipText)

CmdFavorite1.Picture = ReadFromIniFile(LpFileName, "Favorite1", "Picture", FrmCustomLinks.TxtPicturePath.Text)


its reading the caption and url correctly but the picture comes up ad a mismatch. It sees the path though.

is there anyway of storing and calling the path of a picture file from and to an ini file?

Thinker
08-31-2003, 09:08 PM
If the path to a valid image file is stored in that ini file, you must first
use that path with LoadPicture() and set the return value to the picture
property.
Set CmdFavorite1.Picture = LoadPicture(ReadFromIniFile(LpFileName, "Favorite1", "Picture", _
FrmCustomLinks.TxtPicturePath.Text))

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum