buona cassano così va alla grande grazie! LoadPicture(App.Path & "\" & nomevariabile)
Voglio fare un programma, che come skin di fondo utilizzi un'immagine che viene specificata in un file di testo!
Quindi nello stesso programma ci sarà il codice che scrive nel file di testo e quello che recepisce le informazioni!
Dato che sono totalmente nuovo a questo linguaggio mi ci vorrebbero un paio di ragguagli in + per il codice che hai postato mabi!
ho fatto un form vuoto e nel codice ho inserito quello che mi hai dato!
ma mi da l'errore nel debug perchè?Const File1 As String = "C:\File.txt"
Const FileImmagine As String = "Immagine.jpg"
Dim StrTemp As String
Dim Riga As String
'Crea il file
Open File1 For Output As #1 <--- errore del debug
Print #1, Immagine.jpg <---- lho cambiato
Close #1
'---
'Recupera il nome del file immagine
Open File1 For Input As 1
Line Input #1, Riga
Close #1
'---
'Carica l'immagine se esiste
StrTemp = App.Path
If Right(StrTemp, 1) <> "\" Then StrTemp = StrTemp & "\"
StrTemp = (StrTemp & Riga)
If Len(Dir(StrTemp)) > 0 Then
Form.Picture = LoadPicture(StrTemp) <--- lho cambiato
End If