Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005

    Thumbs down Unanswered: Argent Help in wia2 i need loop

    Dear Developers,

    I Have found Code to scan

    Dim _filename As String = "Image"
            Dim JpgFilename As String = path1.Text & _filename & Format(Now, "ddmmyyyyhhmmss") & ".jpg"
            Dim BmpFilename As String = path1.Text & _filename & Format(Now, "ddmmyyyyhhmmss")
                Dim ask = MsgBox("Your File Will be Saved at " & path1.Text, MsgBoxStyle.OkCancel, "Save File")
                If ask = MsgBoxResult.Cancel Then Exit Sub
                Dim Dialog As New Wia.CommonDialog
                Dim _ImageFile As New ImageFile
                Dim _FileExtension As String = "."
                Dim itmX As Integer = 1
                For ItemX = 1 To 1
                    _ImageFile = Dialog.ShowAcquireImage(WiaDeviceType.ScannerDeviceType, WiaImageIntent.ColorIntent, WiaImageBias.MaximizeQuality, , False, True, True)
                    _FileExtension = _ImageFile.FileExtension
                    BmpFilename &= "." & _FileExtension
                    Dim ScannedImage As Image = Image.FromFile(BmpFilename)
                    ScannedImage.Save(JpgFilename, System.Drawing.Imaging.ImageFormat.Jpeg)
                    ScannedImage = Nothing
                    Dialog = Nothing
                    _ImageFile = Nothing
                    With PictureBox1
                        .BackgroundImage = Image.FromFile(JpgFilename)
                        .Tag = JpgFilename
                    End With
                    path2.Text = JpgFilename
            Catch ex As Exception
            End Try
    I need To Do loop coz i have document Feeder so users can scan More Than One documents

    Can any One Help
    Sami Al Damiri ...

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    Now would be a good time to find a rudimentary tutorial on basic VB control structures.

    It's a common topic, here's a million or so places to look:

    visual basic looping - Google Search
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts