Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load If My.Settings.mypath <> String.Empty Then Me.BackgroundImage = Image.FromFile(My.Settings.mypath) End If End Sub
My.Settings.mypath = OpenFileDialog1.FileName My.Settings.Save()
va dire bonjour au poissons
je ne saurais certainement jamais pourquoi j'avais cette erreur et toi non...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionMais il est 9 heures du mat chez moi et mon cerveau a du mal à démarrer...
Le processus ne peut pas accéder au fichier 'backgroundAccueil.jpg', car il est en cours d'utilisation par un autre processus.
Le processus ne peut pas accéder au fichier 'backgroundAccueil.jpg', car il est en cours d'utilisation par un autre processus.
Imports System.IO Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ChangeBackground() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Fich As OpenFileDialog = New OpenFileDialog Fich.ShowDialog() Me.Text = Fich.FileName FileCopy(Fich.FileName, Application.StartupPath & "\Logo.jpg") ChangeBackground() End Sub Private Sub ChangeBackground() If File.Exists(Application.StartupPath & "\Logo.jpg") = True Then Me.BackgroundImage = Image.FromFile(Application.StartupPath & "\Logo.jpg") End If End Sub End Class