C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to move a file to the recycle bin using vb.net


Posted Date: 24 Dec 2007    Resource Type: Code Snippets    Category: Active Directory

Posted By: KVGaneshBabu       Member Level: Diamond
Rating:     Points: 10



Move a file to the recycle bin



'move a file to the recycle bin
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As Long
End Type
Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Private Const FO_DELETE = &H3
Private Const FOF_ALLOWUNDO = &H40

Dim typOperation As SHFILEOPSTRUCT

With typOperation
.wFunc = FO_DELETE
.pFrom = "filename.txt" 'File to move to bin
.fFlags = FOF_ALLOWUNDO
End With
SHFileOperation typOperation





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Vb.net  .  Recycle bin  .  Move  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to Detect if a sound card exists using vb.net
Previous Resource: How to Unload all forms using VB.NET
Return to Discussion Resource Index
Post New Resource
Category: Active Directory


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use