CAFE

vb6 api

CopyFile

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

Option Explicit
Private Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" _
        (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, _
         ByVal bFailIfExists As Long) As Long
Dim sel_fname As String
Dim G_fname As String


Private Sub cmd_exit_Click()
    Unload Me
End Sub


Private Sub cmd_start_Click()
    Dim x  As Long
    Dim kreturn As Long
    x = CopyFile(G_fname, Trim(target.Text), False)
   
    File1.Refresh
    If x = 0 Then
       MsgBox "화일을 복사할 수 없습니다.!..."
    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 Form_Load()

End Sub

첨부파일 CopyFile.zip

 

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

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼