August 11, 2001

Winsock Programming

Most of you might have worked withInternet Transfer Control which is very handy control when it comes to InternetProgramming but there is another control which even more robust and helpsprogrammers

SetIEStartPage – Change IE start page

‘ Set the IE start page’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIEStartPage “http://www.vb2themax.com”Public Sub SetIEStartPage(ByVal sPage As String)

URLEncodeEx – Apply URL encoding rules

‘ Applies URL encoding rules to the specified Text and returns the result’ (similar to Server.URLEncode)Public Function URLEncodeEx(ByVal Text As String) As String Dim abytTokens() As Byte Dim lngTotal As

URLDecodeEx – Decodes an encoded URL

‘ Decodes URL encoding applied to the specified Text and returns the resultPublic Function URLDecodeEx(ByVal Text As String) As String Dim abytTokens() As Byte Dim lngTotal As Long Dim lngCount

GetIEStartPage – Read IE start page

‘ Get the IE start page’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox GetIEStartPagePublic Function GetIEStartPage() As String Const HKEY_CURRENT_USER = &H80000001 GetIEStartPage

HTMLDecodeEx – Decodes HTML encoded strings

‘ Decodes HTML encoding applied to the specified Text and returns the result’ Optionally specify if we encoded a HREF link and the character’ used for encoding – the default