I wish search a folder into a database to change an Image from a combobox
@ 152, 10 COMBOBOX aGet[1] VAR cAzienda ITEMS aAziende SIZE 370,90 PIXEL OF oDlg;
ON CHANGE ChangeComboBoxItem(aGet[1], oBmp01, oAziende)
If found the dir01 as Dat2016 then not found the image (File(cImagePath)) but the image is on that folder DAT2016\immagini\logo.bmp
where is the error ?
@ 152, 10 COMBOBOX aGet[1] VAR cAzienda ITEMS aAziende SIZE 370,90 PIXEL OF oDlg;
ON CHANGE ChangeComboBoxItem(aGet[1], oBmp01, oAziende)
FUNCTION ChangeComboBoxItem(oComboBox, oBmp01, oAziende)
LOCAL cSelectedItem := oComboBox:GetText()
LOCAL cDir01, cImagePath
IF oAziende:Seek(cSelectedItem)
cDir01 := oAziende:Dir01
cImagePath := ".\"+cDir01 + "\immagini\logo.bmp"
// Verifica se il file immagine esiste
IF File(cImagePath)
oBmp01:LoadBmp(cImagePath)
ELSE
MsgInfo("Immagine non trovata: " + cImagePath, "Errore")
ENDIF
ELSE
MsgInfo("Elemento non trovato nel database: " + cSelectedItem, "Errore")
ENDIF
RETURN NILIf found the dir01 as Dat2016 then not found the image (File(cImagePath)) but the image is on that folder DAT2016\immagini\logo.bmp
where is the error ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
