Results 1 to 2 of 2

Thread: [RESOLVED] [2005] How to check if a web file exists

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Location
    Netherlands
    Posts
    203

    Resolved [RESOLVED] [2005] How to check if a web file exists

    Hi there,

    i am bulding a Troubleshooter for a game. but i want to check if a swf/as file on my site exists. how do i do this?


    Greets, Thijsd


    Btw. srry for my bad enlish, i am dutch :P
    Last edited by thijsd; May 1st, 2007 at 08:03 AM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Location
    Netherlands
    Posts
    203

    Re: [2005] How to check if a web file exists

    already fixed:

    Code:
      Public Function CheckSwf() As Boolean
            Dim wc As New Net.WebClient
            Try
                wc.DownloadData("FileHere")
                Me.Label6.Text = "Succes!"
                Me.Label6.ForeColor = Color.Green
                Return True
            Catch ex As Exception
                Me.Label6.Text = "Error!"
                Me.Label6.ForeColor = Color.Red
                Return False
            Finally
                If Not wc Is Nothing Then
                    wc.Dispose()
                    wc = Nothing
                End If
            End Try
        End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width