By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

VB code to check the latest version on website.

P: 30
Hi All,

I have created an application and uploaded in geocities.com\...html. I want the VB application to check the latest/updated version application from geocities\...html when it checks for updates online.If we upload a new/latest version in geocities.com then the vb application should prompt for the latest application otherwise no.
Thanks in Advance,

Kinnu
Nov 9 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 267
Hi All,

I have created an application and uploaded in geocities.com\...html. I want the VB application to check the latest/updated version application from geocities\...html when it checks for updates online.If we upload a new/latest version in geocities.com then the vb application should prompt for the latest application otherwise no.
Thanks in Advance,

Kinnu
hi

first you should know the address where to look for the version-number and secondly the address where to download the program.

txtURL is actually a (non-visible) textbox on your form



Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim bData() As Byte
  3. With Inet1
  4.     .AccessType = icUseDefault
  5.     .Protocol = icDefault
  6.     txtURL.Text = web-address-versionnumber 
  7.     NewVersion = .OpenURL(txtURL.Text, 0)
  8. End With
  9. If Not NewVersion=vbNullString and NewVersion>PresentVersion Then
  10.         txtURL.Text = web-address-latestprogram 
  11.         bData() = Inet1.OpenURL(txtURL.Text, icByteArray)
  12.         NewFile = App.Path & "\" & DownLoadedFilename
  13.         Frn = FreeFile
  14.             Open NewFile For Binary As #Frn
  15.             Put #Frn, , bData()
  16.             Close #Frn
  17. End If
  18.  
  19.  
Nov 10 '06 #2

P: 30
Thank you very much for the information. I will try and let you know.


hi

first you should know the address where to look for the version-number and secondly the address where to download the program.

txtURL is actually a (non-visible) textbox on your form



Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim bData() As Byte
  3. With Inet1
  4.     .AccessType = icUseDefault
  5.     .Protocol = icDefault
  6.     txtURL.Text = web-address-versionnumber 
  7.     NewVersion = .OpenURL(txtURL.Text, 0)
  8. End With
  9. If Not NewVersion=vbNullString and NewVersion>PresentVersion Then
  10.         txtURL.Text = web-address-latestprogram 
  11.         bData() = Inet1.OpenURL(txtURL.Text, icByteArray)
  12.         NewFile = App.Path & "\" & DownLoadedFilename
  13.         Frn = FreeFile
  14.             Open NewFile For Binary As #Frn
  15.             Put #Frn, , bData()
  16.             Close #Frn
  17. End If
  18.  
  19.  
Nov 15 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.