Results 1 to 4 of 4

Thread: Updater code problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Unhappy Updater code problem

    Hi everyone!

    I can't understand what's wrong with this code..

    Code:
    Private Sub Form_Load()
    Dim latest_version As String
    Dim this_version As String
    latest_version = Inet1.OpenURL("http://manu6.manufrog.com/~intethin/eva/version.txt")
    this_version = "001"
    MsgBox latest_version
    MsgBox this_version
    If latest_version <> this_version Then
        MsgBox "New update is available!"
    End If
    End Sub
    My problem is that the MsgBox with "New update is available!" never show up...why!?!
    Last edited by Hack; Jun 20th, 2007 at 07:09 AM. Reason: Fixed code tags
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

  2. #2
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,663

    Re: Updater code problem

    Try:

    Code:
    Dim latest_version As String
    Dim this_version As String
    latest_version = Inet1.OpenURL("http://manu6.manufrog.com/~intethin/eva/version.txt")
    this_version = app.major & "." & app.minor & "." & app.revision
    
    if not latest_version <= this_version then msgbox "Update Available"
    Also whats inside Version.txt? Imean how is it formatted ? is it: #.#.# ?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Updater code problem

    Post the value of latest_version and this_version
    Please mark you thread resolved using the Thread Tools as shown

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Re: Updater code problem

    I switched my code to yours, some1uk03, since it's smaller.
    But it still didn't work..it said that an update always was available, then I realized that the problem was in the declaration.
    It should be Double variables, not String.

    Now it works! Thx!
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

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