If File.Exists("C:\Documents and Settings\pandøra\Bureau\Atlantis\log_config.xml") = true then msgbox("Le fichier existe") 'Actions à effectuer' else msgbox("Le fichier n'existe pas") 'Actions à effectuer' end if
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionImports System.IO Public Class MainForm Public Function Fichier_Existe(ByVal Path As String) As Boolean If File.Exists("C:\Documents and Settings\Elodie\Bureau\D-Emu\log_config.xml") = True Then msgbox("Le fichier existe") Else msgbox("Le fichier n'existe pas") End If End Function Private Sub MainForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Utils.Logs.Info("Fermeture du serveur") World.ThreadSave() End Sub Private Delegate Sub StartDelegate() Private Sub StartServer() Utils.Logs.MainFrm = Me If Me.InvokeRequired Then Me.Invoke(New StartDelegate(AddressOf StartServer)) Exit Sub End If Try Utils.Logs.Info("Atlantis 0.1 démarré avec succès") Utils.Config.LoadConfig() Utils.MakeDirectories() Battle.LaunchTimer() Utils.Logs.Info("Connexion à la base de donné ...") If Not SQL.OpenConnexion() Then Utils.Logs.Erreur("Impossible de se connecter à la base de donnée !") Exit Sub End If Utils.Logs.Info("Chargement en cours...") Spells.SetupSpells() Items.SetupItems() Items.SetupPanoplies() NPC.SetupNPCs() Interactive.SetupObjects() Monster.SetupMonsters() Utils.LaunchServers() Maps.Init() World.EnableTimer() Utils.Logs.Info("Chargement effectuer avec succès") Catch ex As Exception Utils.Logs.Erreur("Erreur : " & ex.Message) Debug.Print(ex.ToString) End Try End Sub
Public Function startServer(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If File.Exists("C:\Documents and Settings\Atlentis\Bureau\Atlantis\log_config.xml") = True Then Else Form3.show() End If End Function
Private Delegate Sub StartDelegate() '<<= Et le End Sub ? Private Sub StartServer()