Click here to Skip to main content
16,010,650 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralTime our Erro in Gmail Smtp(Code included) Pin
plural20-Jan-08 22:50
plural20-Jan-08 22:50 
GeneralRe: Time our Erro in Gmail Smtp(Code included) Pin
plural20-Jan-08 23:15
plural20-Jan-08 23:15 
GeneralOCX contol Pin
soniasan20-Jan-08 20:51
soniasan20-Jan-08 20:51 
GeneralRe: OCX contol Pin
divyesh143221-Jan-08 1:21
divyesh143221-Jan-08 1:21 
GeneralRe: OCX contol Pin
soniasan21-Jan-08 19:22
soniasan21-Jan-08 19:22 
QuestionHow to detect lost internet connection ? Pin
cheeken2u20-Jan-08 20:15
cheeken2u20-Jan-08 20:15 
GeneralRe: How to detect lost internet connection ? Pin
Vimalsoft(Pty) Ltd21-Jan-08 0:30
professionalVimalsoft(Pty) Ltd21-Jan-08 0:30 
GeneralRe: How to detect lost internet connection ? Pin
Steven J Jowett21-Jan-08 2:19
Steven J Jowett21-Jan-08 2:19 
firstly I would not check the connection every second, I would only check it just before I upload the file.

I use a function like the following to check if a connection exists :-

Public Shared Function IsWebSiteAvailable(ByVal Address As String) As Boolean<br />
            Try<br />
                Dim oUrl As New System.Uri(Address)<br />
                Dim oWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(oUrl)<br />
                Dim oResponse As System.Net.WebResponse = oWebRequest.GetResponse<br />
                oResponse.Close()<br />
                oWebRequest = Nothing<br />
                Return True<br />
            Catch<br />
                Return False<br />
            End Try<br />
        End Function


There I would the code the upload as follows

If IsWebSiteAvailable("www.mysite.com") Then<br />
DoUpload()<br />
Else<br />
MessageBox.Show("Internet connection unavailable.")<br />
End If<br />


Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

QuestionHow to Pass a Double Quote (")in a string ? Pin
SekharOne20-Jan-08 18:44
SekharOne20-Jan-08 18:44 
AnswerRe: How to Pass a Double Quote (")in a string ? Pin
Nilesh Hapse20-Jan-08 20:38
Nilesh Hapse20-Jan-08 20:38 
AnswerRe: How to Pass a Double Quote (")in a string ? Pin
John_Adams20-Jan-08 22:45
John_Adams20-Jan-08 22:45 
AnswerRe: How to Pass a Double Quote (")in a string ? Pin
The Mighty Atom21-Jan-08 10:20
The Mighty Atom21-Jan-08 10:20 
QuestionGlobal hooks from a Windows Service Pin
Raveheart20-Jan-08 9:15
Raveheart20-Jan-08 9:15 
QuestionDrag and Drop from One Treeview To Another Treeview By VB.Net 2005 Pin
ejaz_pk20-Jan-08 8:07
ejaz_pk20-Jan-08 8:07 
GeneralRe: Drag and Drop from One Treeview To Another Treeview By VB.Net 2005 Pin
Paul Conrad20-Jan-08 10:18
professionalPaul Conrad20-Jan-08 10:18 
QuestionRe: Drag and Drop from One Treeview To Another Treeview By VB.Net 2005 Pin
ejaz_pk21-Jan-08 2:35
ejaz_pk21-Jan-08 2:35 
QuestionInstance Pin
roger689720-Jan-08 6:31
roger689720-Jan-08 6:31 
GeneralRe: Instance Pin
Colin Angus Mackay20-Jan-08 10:50
Colin Angus Mackay20-Jan-08 10:50 
QuestionPocket PC Connections? Pin
Widgets20-Jan-08 2:16
Widgets20-Jan-08 2:16 
GeneralSyntax Highlighting Pin
The Mighty Atom20-Jan-08 2:03
The Mighty Atom20-Jan-08 2:03 
GeneralRe: Syntax Highlighting Pin
The ANZAC20-Jan-08 18:36
The ANZAC20-Jan-08 18:36 
GeneralRe: Syntax Highlighting Pin
The Mighty Atom21-Jan-08 2:59
The Mighty Atom21-Jan-08 2:59 
GeneralRe: Syntax Highlighting Pin
The ANZAC21-Jan-08 14:06
The ANZAC21-Jan-08 14:06 
GeneralRe: Syntax Highlighting Pin
The Mighty Atom22-Jan-08 2:04
The Mighty Atom22-Jan-08 2:04 
GeneralGetting the number of rows from a table adapter query Pin
AAGTHosting19-Jan-08 17:17
AAGTHosting19-Jan-08 17:17 

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.