CAFE

vb6 api

DeleteFile

작성자올란도|작성시간09.01.29|조회수125 목록 댓글 0

Option Explicit

Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" _
       (ByVal lpFileName As String) As Long

Dim sel_fname As String
Dim G_fname As String

Private Sub cmd_DeleteFile_Click()
    Dim rtn  As Long
   
       rtn = DeleteFile(G_fname)
       File1.Refresh

       If rtn = 0 Then
          Label1.Caption = "화일을 삭제 하는데 실패 하였습니다."
       Else
          Label1.Caption = "화일을 삭제 하였습니다."
       End If

End Sub

Private Sub Dir1_Change()
    File1.Path = Dir1.Path
    sel_fname = ""
    G_fname = ""

End Sub

Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_Click()
   
      sel_fname = File1.FileName
      G_fname = File1.Path & "\" & File1.FileName
      source.Caption = File1.Path & "\" & File1.FileName
       
End Sub


Private Sub cmd_exit_Click()
    Unload Me
End Sub

Private Sub Form_Load()

End Sub

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼