FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour search a image
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

search a image

Posted: Mon Jan 20, 2025 09:23 AM
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)
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 NIL

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 ?
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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: search a image

Posted: Mon Jan 20, 2025 11:57 AM

What is the final value for cImagePath ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: search a image

Posted: Mon Jan 20, 2025 12:26 PM
Antonio Linares wrote: What is the final value for cImagePath ?
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
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: search a image

Posted: Mon Jan 20, 2025 12:27 PM

sorry my mistake

it was login.bmp no logo.bmp

sorry I'm not feeling well these days

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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: search a image

Posted: Mon Jan 20, 2025 12:49 PM
never mind my friend :)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion