Results 1 to 3 of 3

Thread: I wanna remove message in IE

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Pakistan
    Posts
    15

    Question I wanna remove message in IE

    I call add to favorite window of IE in my own web browser but i wanna remove message of (Internet Explore will add this page in ur favorite list) and want to write my own message.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    VB Code:
    1. Option Explicit
    2.  
    3. Public Enum SpecialShellFolderIDs
    4.    CSIDL_DESKTOP = &H0
    5.    CSIDL_INTERNET = &H1
    6.    CSIDL_PROGRAMS = &H2
    7.    CSIDL_CONTROLS = &H3
    8.    CSIDL_PRINTERS = &H4
    9.    CSIDL_PERSONAL = &H5
    10.    CSIDL_FAVORITES = &H6
    11.    CSIDL_STARTUP = &H7
    12.    CSIDL_RECENT = &H8
    13.    CSIDL_SENDTO = &H9
    14.    CSIDL_BITBUCKET = &HA
    15.    CSIDL_STARTMENU = &HB
    16.    CSIDL_DESKTOPDIRECTORY = &H10
    17.    CSIDL_DRIVES = &H11
    18.    CSIDL_NETWORK = &H12
    19.    CSIDL_NETHOOD = &H13
    20.    CSIDL_FONTS = &H14
    21.    CSIDL_TEMPLATES = &H15
    22.    CSIDL_COMMON_STARTMENU = &H16
    23.    CSIDL_COMMON_PROGRAMS = &H17
    24.    CSIDL_COMMON_STARTUP = &H18
    25.    CSIDL_COMMON_DESKTOPDIRECTORY = &H19
    26.    CSIDL_APPDATA = &H1A
    27.    CSIDL_PRINTHOOD = &H1B
    28.    CSIDL_ALTSTARTUP = &H1D
    29.    CSIDL_COMMON_ALTSTARTUP = &H1E
    30.    CSIDL_COMMON_FAVORITES = &H1F
    31.    CSIDL_INTERNET_CACHE = &H20
    32.    CSIDL_COOKIES = &H21
    33.    CSIDL_HISTORY = &H22
    34. End Enum
    35.  
    36. Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
    37. Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As SpecialShellFolderIDs, pidl As Long) As Long
    38. Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal pv As Long)
    39.  
    40. Public Function AddFavorite(SiteName As String, URL As String) As Boolean
    41.  
    42. Dim pidl As Long
    43. Dim psFullPath As String
    44. Dim iFile As Integer
    45. On Error GoTo ErrorHandler
    46. iFile = FreeFile
    47. psFullPath = Space(255)
    48.  
    49. If SHGetSpecialFolderLocation(0, CSIDL_FAVORITES, pidl) = 0 Then
    50.        If pidl Then
    51.             If SHGetPathFromIDList(pidl, psFullPath) Then
    52.                   psFullPath = TrimWithoutPrejudice(psFullPath)
    53.                   If Right(psFullPath, 1) <> "\" Then psFullPath = psFullPath & "\"
    54.                   psFullPath = psFullPath & SiteName & ".URL"
    55.                   Open psFullPath For Output As #iFile
    56.                   Print #iFile, "[InternetShortcut]"
    57.                   Print #iFile, "URL=" & URL
    58.                   Close #iFile
    59.             End If
    60.        CoTaskMemFree pidl
    61.        AddFavorite = True
    62.    End If
    63. End If
    64.  
    65. ErrorHandler:
    66. End Function
    67.  
    68. Public Function TrimWithoutPrejudice(ByVal InputString As String) As String
    69.  
    70. Dim sAns As String
    71. Dim sWkg As String
    72. Dim sChar As String
    73. Dim lLen As Long
    74. Dim lCtr As Long
    75.  
    76. sAns = InputString
    77. lLen = Len(InputString)
    78.  
    79. If lLen > 0 Then
    80.     For lCtr = 1 To lLen
    81.         sChar = Mid(sAns, lCtr, 1)
    82.         If Asc(sChar) > 32 Then Exit For
    83.     Next
    84.     sAns = Mid(sAns, lCtr)
    85.     lLen = Len(sAns)
    86.     If lLen > 0 Then
    87.         For lCtr = lLen To 1 Step -1
    88.             sChar = Mid(sAns, lCtr, 1)
    89.             If Asc(sChar) > 32 Then Exit For
    90.         Next
    91.     End If
    92.     sAns = Left$(sAns, lCtr)
    93. End If
    94. TrimWithoutPrejudice = sAns
    95.  
    96. End Function
    97.  
    98. Private Sub Command1_Click()
    99. Dim z As Boolean
    100.  
    101. z = AddFavorite("vbforums", "www.vbforums.com")
    102. End Sub
    ksm

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Pakistan
    Posts
    15

    Question re I wanna remove add to favorite message in IE

    thanks Kunchesm for ur repply and mail, but i thing u didn't understand what my need, i explaine to u again.

    I call add to favorite window of IE in my own browser by API, but i wanna remove label text of add to favorite window and wanna write my own text on label box.

    Your code is adding site address directly in favorite list.

    regards
    Babar Khan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width