Results 1 to 3 of 3

Thread: Still problems...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    PORTUGAL
    Posts
    18

    Unhappy

    I tried the code of Matthew Gates using "Call Recycle("test.txt", rfRecycle)" code to a button. It insists in killing the file and not sending it to the Recycle Bin.
    Otherwise, it shows the confirm question and I'd rather prefer it doesn't appear.

    My best regards

    José Nogueira
    Eng. José Nogueira
    Mail: [email protected]
    Web: planeta.clix.pt/janogueira
    Entroncamento-Santarém-PORTUGAL

  2. #2
    Guest
    Did you try the other code? That wasn't just for VB4.

    Code:
    Public 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
    
    Public Declare Function SHFileOperation Lib _
    "shell32.dll" Alias "SHFileOperationA" (lpFileOp _
    As SHFILEOPSTRUCT) As Long
    
    Public Const FO_DELETE = &H3
    Public Const FOF_ALLOWUNDO = &H40      
    
    Usage
    
    Dim SHop As SHFILEOPSTRUCT
    Dim strFile as string
    
    With SHop
        .wFunc = FO_DELETE
        .pFrom = strFile '<-file to be recycled
        .fFlags = FOF_ALLOWUNDO
    End With

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    PORTUGAL
    Posts
    18

    Unhappy Still problems....

    I used again Matthew Gates code posted in his last message. Instead of doing ".pFrom = strFile '<-file to be recycled" and change the strFile variable I prefered not to modify it and had previously of it the code line strFile="test.txt".
    The rest remains the same.

    Why doesn't it work? Nothing happens !

    My best regards

    José Nogueira
    Eng. José Nogueira
    Mail: [email protected]
    Web: planeta.clix.pt/janogueira
    Entroncamento-Santarém-PORTUGAL

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