search a image

Post Reply
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

search a image

Post by Silvio.Falconi »

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)

Code: Select all | Expand


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 November 2023 - January 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
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: search a image

Post by Antonio Linares »

What is the final value for cImagePath ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a image

Post by Silvio.Falconi »

Antonio Linares wrote: Mon Jan 20, 2025 11:57 am What is the final value for cImagePath ?
Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
Posts: 7110
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a image

Post by Silvio.Falconi »

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 November 2023 - January 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
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: search a image

Post by Antonio Linares »

never mind my friend :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply