Jump to content

Ajuda num erro


Paulo Dias

Recommended Posts

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. :wallbash:

Podem-me ajudar?  😁

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.