Click here to Skip to main content
15,897,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to ftp upload file from windows to unix server Pin
rprateek4-Nov-08 15:33
rprateek4-Nov-08 15:33 
QuestionFolder monitering Pin
jishbalan3-Nov-08 0:11
jishbalan3-Nov-08 0:11 
AnswerRe: Folder monitering Pin
Eddy Vluggen3-Nov-08 0:19
professionalEddy Vluggen3-Nov-08 0:19 
GeneralRe: Folder monitering Pin
jishbalan3-Nov-08 1:22
jishbalan3-Nov-08 1:22 
GeneralRe: Folder monitering Pin
Steven J Jowett3-Nov-08 1:28
Steven J Jowett3-Nov-08 1:28 
QuestionRe: Folder monitering Pin
Eddy Vluggen3-Nov-08 1:41
professionalEddy Vluggen3-Nov-08 1:41 
GeneralRe: Folder monitering Pin
Uros Calakovic3-Nov-08 10:40
Uros Calakovic3-Nov-08 10:40 
QuestionProxy error / get defaultproxy Pin
JR2122-Nov-08 21:19
JR2122-Nov-08 21:19 
Hi,

I use the following code to check if there is on the internet a new version
''' <summary>
''' Check for download and if one, download it
''' </summary>
''' <param name="HTTPPath">that basepath where all files will be found on the internet</param>
''' <remarks></remarks>
Function sCheckUpdate(ByVal HTTPPath As String) As Boolean
    Dim wc As Net.WebClient = Nothing
    Dim bReturn As Boolean
    Try
        Dim fileProgram As String = New IO.FileInfo(Application.ExecutablePath).FullName
        Dim fi As New IO.FileInfo(fileProgram)
        Dim VerUri As String = Left(fi.Name, fi.Name.Length - fi.Extension.Length) & ".txt"
        VerUri = IO.Path.Combine(HTTPPath, VerUri).Replace("\", "/")
        Dim dest As String = Left(fi.FullName, fi.FullName.Length - fi.Extension.Length) & ".zip"
        If Not HTTPPath.EndsWith("/") Then HTTPPath &= "/"
        HTTPPath &= Left(fi.Name, fi.Name.Length - fi.Extension.Length) & ".zip"

        Dim png As New System.Net.NetworkInformation.Ping
        Dim rep As System.Net.NetworkInformation.PingReply
        rep = png.Send("74.125.47.118", 3000)   'google / 193.191.180.197=post
        If rep.Status = Net.NetworkInformation.IPStatus.Success Then
            wc = New Net.WebClient
            'Dim pProxy As Net.WebProxy = Net.HttpWebRequest.DefaultWebProxy
            'wc.Proxy = pProxy
            Dim version As Byte() = wc.DownloadData(VerUri)
            Dim sHTTPver As String = System.Text.ASCIIEncoding.ASCII.GetString(version)
  Dim vnCurrentVersion As System.Version = fVersionNumber()
            Dim nVersion As Double = Val(vnCurrentVersion.Build & "." & vnCurrentVersion.Revision.ToString("00000"))
            Dim nhttpVer As Double = Val(sHTTPver)
            If nhttpVer > nVersion Then
                If MessageBox.Show(LangSet.Update.NewExist, LangSet.Update.Available, _
                 MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
                    wc.DownloadFile(HTTPPath, dest)
                    bReturn = True
                End If
            ElseIf nhttpVer < nVersion Then
                MessageBox.Show("Your version is better than on the internet", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information)
            Else
                MessageBox.Show(LangSet.Update.NewestVersion, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If
        Else
            MessageBox.Show(LangSet.Update.NetWorkError & Environment.NewLine & Environment.NewLine & rep.Status.ToString)
        End If
        png.Dispose()
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
    If Not wc Is Nothing Then
        wc.Dispose()
    End If
    Return bReturn
End Function


however, If someone use a proxy with login and password the function fails. how can I get that information on the brouwser?

getdefaultbrouwser give the error this function is outdated

Jan
QuestionDraw shape on the basis of some point Pin
sunil goyalG2-Nov-08 20:14
sunil goyalG2-Nov-08 20:14 
AnswerRe: Draw shape on the basis of some point Pin
dan!sh 2-Nov-08 22:59
professional dan!sh 2-Nov-08 22:59 
GeneralRe: Draw shape on the basis of some point Pin
sunil goyalG3-Nov-08 0:53
sunil goyalG3-Nov-08 0:53 
GeneralRe: Draw shape on the basis of some point Pin
dan!sh 3-Nov-08 7:31
professional dan!sh 3-Nov-08 7:31 
QuestionRelation setting Pin
niwre the newbie2-Nov-08 18:07
niwre the newbie2-Nov-08 18:07 
Questionusing files Pin
revath2-Nov-08 17:58
revath2-Nov-08 17:58 
AnswerRe: using files Pin
Ashfield2-Nov-08 20:27
Ashfield2-Nov-08 20:27 
AnswerRe: using files Pin
Steven J Jowett2-Nov-08 23:22
Steven J Jowett2-Nov-08 23:22 
QuestionMe.Location Pin
User 54091902-Nov-08 11:15
User 54091902-Nov-08 11:15 
AnswerRe: Me.Location Pin
Dave Kreskowiak2-Nov-08 11:26
mveDave Kreskowiak2-Nov-08 11:26 
AnswerRe: Me.Location Pin
Luc Pattyn2-Nov-08 12:16
sitebuilderLuc Pattyn2-Nov-08 12:16 
QuestionNeed Help to Create DSN in Installer Class [modified] Pin
Saseendran Kombath1-Nov-08 7:51
Saseendran Kombath1-Nov-08 7:51 
AnswerRe: Need Help to Create DSN in Installer Class Pin
Dave Kreskowiak1-Nov-08 11:48
mveDave Kreskowiak1-Nov-08 11:48 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath1-Nov-08 15:16
Saseendran Kombath1-Nov-08 15:16 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Dave Kreskowiak1-Nov-08 15:29
mveDave Kreskowiak1-Nov-08 15:29 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath1-Nov-08 17:05
Saseendran Kombath1-Nov-08 17:05 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath2-Nov-08 6:42
Saseendran Kombath2-Nov-08 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.