Results 1 to 8 of 8

Thread: add new file

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2012
    Posts
    7

    add new file

    hi!

    I am trying to when my user scan image it check how many image in folder and then add +1 image to that folder and save. Please help me where am i wrong in below code cos it scan and save but not add in folder

    Code:
    Private Sub vstwain1_PostScan(ByVal flag As Long)
    If flag <> 0 Then
              If vstwain1.errorCode <> 0 Then
                  MsgBox vstwain1.errorString
               End If
              Else
                 
        Dim lnFileCount As Long
        Dim sphotocount As Long
        Dim sPhotoFile As String
        Dim sNewFile As String
        
        
           sPhotoFile = Dir(sPhotoPath & "\photo *.jpg")
           lnFileCount = lnFileCount + 1
           sNewFile = sPhotoPath & "photo" & (lnFileCount) & ".jpg"
      Set Image1.Picture = vstwain1.GetCurrentImage
           If vstwain1.SaveImage(0, sNewFile) = 0 Then
                 MsgBox vstwain1.errorString
              End If
          End If
        
    End Sub

    thanks
    Last edited by Siddharth Rout; Aug 29th, 2012 at 03:47 AM. Reason: Added Code Tags

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