VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVA

by Dipen Anovadia (19 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 15th April 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVAILABLE.

API Declarations



Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Rate DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVA



'        Command Button    - Command1

Public Function SystemDir() As String

    Dim sBuffer As String

    sBuffer = String(255, Chr$(0))
    Call GetSystemDirectory(sBuffer, Len(sBuffer))

    SystemDir = Replace(sBuffer, Chr$(0), "")
End Function

Public Function DNSError(sURL As String) As Long

    Dim sCommand As String

    sCommand = "res://" & SystemDir() & "\SHDOCLC.DLL/dnserror.htm#"
    sCommand = sCommand & sURL

    DNSError = ShellExecute(0&, "open", sCommand, vbNullString, vbNullString, 1&)
End Function

Private Sub Command1_Click()

    'Setting return value to caption for just information only...
    Caption = DNSError(Text1)
End Sub

'Errors, feedbacks, etc...
'MAIL: [email protected]

Download this snippet    Add to My Saved Code

DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVA Comments

No comments have been posted about DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVA. Why not be the first to post a comment about DISPLAYS THE 'DNS ERROR' PAGE, AS DISPLAYED IN INTERNET EXPLORER WHEN THE PAGE REQUESTED IS NOT AVA.

Post your comment

Subject:
Message:
0/1000 characters