Question:

Which component is used to connect the internet in vb 6.0?

by  |  earlier

0 LIKES UnLike

Which component is used to connect the internet in vb 6.0?

 Tags:

   Report

1 ANSWERS


  1.   Private Sub cmdGo_Click()

          Dim sFileName As String

          Dim sDummy As String

          Dim sBrowserExec As String * 255

          Dim lRetVal As Long

          Dim iFileNumber As Integer

          '

          ' Create a temporary HTM file

          '

          sBrowserExec = Space(255)

          sFileName = "C:\TheScarms.HTM"

          iFileNumber = FreeFile

          Open sFileName For Output As #iFileNumber

          Write #iFileNumber, "<HTML> <\HTML>"

          Close #iFileNumber

          '

          ' Find the default browser associated with the .htm file.

          '

          lRetVal = FindExecutable(sFileName, "", sBrowserExec)

          sBrowserExec = Trim$(sBrowserExec)

          '

          ' If a browser was found, launch it.

          '

          If lRetVal <= 32 Or IsEmpty(sBrowserExec) Then

             MsgBox "Could not locate your Browser", _

                vbExclamation, "Browser Not Found"

          Else

             lRetVal = ShellExecute(Me.hwnd, quot;open", sBrowserExec, _

                txtUrl.Text, "", SW_SHOWNORMAL)

              If lRetVal <= 32 Then

                 MsgBox "Web Page Not Opened", _

                    vbExclamation, "URL Failed"

              End If

          End If

          Kill sFileName

    End Sub

    To connect to the Internet:

       Private Sub cmdConnect_Click()

          Dim lResult As Long

      

          lResult = InternetAutodial(Internet_Autodial_Force... 0&)

       End Sub

    To Disconnect from the Internet:

       Private Sub cmdConnect_Click()

          Dim lResult As Long

          lResult = InternetAutodialHangup(0&)

    End Sub

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.