Paulo Dias Posted June 9, 2008 at 10:11 PM Report Share #190390 Posted June 9, 2008 at 10:11 PM Boas... Eu estou a desenvolver um software que quando inicia tem de ver se ja houve algum registo, se ja ouve vai para um form de login, se nao vai para um forme de Codekey. e eu meti este código 😞 Public Class Form3 Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not File.Exists(dir("util")) Then CodeKey.Show() Else Login.Show() End If Me.SendToBack() End Sub End Class Mas diz-me que file nao está declarado e dá-me erro, se eu declarar file da-me erro em exists. Podem-me ajudar? 😁 Link to comment Share on other sites More sharing options...
jpaulino Posted June 9, 2008 at 10:17 PM Report Share #190392 Posted June 9, 2008 at 10:17 PM IO.File.Exists() Mas parece-me que queres procurar uma directoria !? Se for utiliza: IO.Directory.Exists() Link to comment Share on other sites More sharing options...
José Lopes Posted June 9, 2008 at 10:19 PM Report Share #190393 Posted June 9, 2008 at 10:19 PM Estarás a tentar ver se o ficheiro existe? nao podes usar o file assim... Experimenta passar o caminho do ficheiro pela função seguinte: Private Function FileExists(ByVal strPath As String) As Boolean Return My.Computer.FileSystem.FileExists(strPath) End Function Quando te pedirem peixe.... ensina-os a Pescar!!Hum..lálálálá!! Link to comment Share on other sites More sharing options...
Paulo Dias Posted June 9, 2008 at 10:25 PM Author Report Share #190395 Posted June 9, 2008 at 10:25 PM Já esta a dar 😁 è como tu dissest josé Lopez 😛 Muito obrigado 😞 Link to comment Share on other sites More sharing options...
jpaulino Posted June 9, 2008 at 10:26 PM Report Share #190396 Posted June 9, 2008 at 10:26 PM IO.File.Exists() também funciona! Só para o registo 😞 Link to comment Share on other sites More sharing options...
José Lopes Posted June 9, 2008 at 10:28 PM Report Share #190397 Posted June 9, 2008 at 10:28 PM yap... eu so ajeitei uma bocadito o snippet do vb...para poder ser reutilizado ;-) aliás.. na minha funcão eu uso precisamente essa opção Quando te pedirem peixe.... ensina-os a Pescar!!Hum..lálálálá!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now