Code to delete favorites ?

You can talk about VB programming here

Code to delete favorites ?

Postby locohacker » Fri Feb 18, 2005 2:03 am


Hey I am working on my new ban remover, do any of u can hook me up with the code to delete favorites folder, no time right now to search :0) Thanks
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

lol

Postby Guest » Fri Feb 18, 2005 9:59 pm

locohacker what i use is this....

Mod.....
Code: Select all
Public 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
Public Function OpenURL(ByVal URL As String) As Long
    OpenURL = ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
End Function



XP Code:
Code: Select all
OpenURL "C:\Documents and Settings\All Users\Favorites"


Windows 98 Code:
Code: Select all
OpenURL "C:\WINDOWS\Favorites"


you can put the OpenURL "C:\Documents and Settings\All Users\Favorites" in a command button ect... same with OpenURL "C:\WINDOWS\Favorites"

so when they click on the button for exsample it will pop up the Favorites folder and they can delete whats in there Favorites :)

maybe someone knows a better way but thats how i do it ;)
Guest
 

Postby locohacker » Sat Feb 19, 2005 1:29 pm

Thanks a lot thats exactly what I needed :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Postby locohacker » Sat Feb 19, 2005 4:25 pm

Check this little change I made, cause before dont know it suppose to but didnt take me to the xp user favorites,

Code: Select all
If Environ("OS") = "Windows_NT" Then
OpenURL "C:\Documents and Settings\" & Environ("USERNAME") & "\Favorites"
Else
OpenURL "C:\WINDOWS\Favorites"
End If


Now it takes me to the fav folder of the window xp user :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests