Recent Posts

Pages: [1] 2 3 ... 10
1
Programming Errors / Re: VB error msg on POS part 3 toturial
« Last post by mkaatr on June 19, 2017, 08:24:15 PM »
Hello there...

The error message states that you are going beyond the maximum index available. Please check the for loop condition:

        For I = 0 To DGV2.Rows.Count = 1


it should be

        For I = 0 To DGV2.Rows.Count - 1

The way you wrote it I think could be making the program to enter a loop even if there is no row at all.

Yours sincerely

mkaatr
2
Programming Errors / VB error msg on POS part 3 toturial
« Last post by laulong79 on June 19, 2017, 09:08:13 AM »
Pls. help to advice, Im facing below error
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"

Here is the script:
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        'get the details of the items
        Dim R As POS.POSDS.ItemsRow = Button1.Tag

        'next search for the barcode in the datagridview
        Dim I As Integer
        Dim ItemLoc As Integer = -1
        For I = 0 To DGV2.Rows.Count = 1
            If R.Barcode = DGV2.Rows(I).Cells(0).Value Then  <----(error at here)

                'item found
                ItemLoc = I
                Exit For

            End If
        Next

        'if item is not found, add it
        If ItemLoc = -1 Then
            DGV2.Rows.Add(R.Barcode, R.ItemName, R.BuyPrice, R.SellPrice, 1, R.SellPrice)

        Else
            'it item already there incrase its count
            Dim ItemCount As Long = DGV2.Rows(ItemLoc).Cells(4).Value
            ItemCount += 1
            Dim NewPrice As Decimal = R.SellPrice * ItemCount
            DGV2.Rows(ItemLoc).Cells(4).Value = ItemCount
            DGV2.Rows(ItemLoc).Cells(5).Value = NewPrice
        End If


        'next clear textbox1 and set focus to it
        TextBox1.Text = ""
        TextBox1.Focus()
    End Sub
3
Twain Lib / Re: when I use the twainlib give me this error, dont find the scanner
« Last post by mkaatr on March 29, 2017, 06:29:30 PM »
Hi there...

Sorry for the late reply. This error means that the DLLs needed for scanning are not included with your exe. Just make sure that the DLL files that you reference are part of the project output, i.e. the compiler put them with the executable. This should solve your issue.

yours sincerely.
4
Twain Lib / when I use the twainlib give me this error, dont find the scanner
« Last post by gonzalocimma on March 22, 2017, 09:57:06 PM »
In my proyect, give me this error

when tray to select default scanner

Could not load file or assembly 'TwainLib, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

but when open your proyect, they find the scanner, what is wrong
I include the twainlib in the reference, visual studio 2015, windows 7 and windows 10
why in your proyect is ok, and the my not, I use the same code and form1

I think the difference is the cpu this class work with 32bits, and have 64bits I select all cpu, but mark prefer 32bits
5
Twain Lib / Re: Auto Initialization
« Last post by mkaatr on September 29, 2016, 09:42:12 AM »
Any Feedback yet?

Hi there...

Sorry for the late reply...

Sadly the library does not support auto scanning. The problem is that I can't remember much of the library since I worked on translating it from C# from another guy and added very few improvement. You could always go back to the Twain Specification to see how that get done, but I am afraid I am being too busy to work on that for the last few months  :(.

yours sincerely
6
Twain Lib / Re: Auto Initialization
« Last post by mkaatr on September 28, 2016, 09:02:33 PM »
Sorry for the late response...

I haven't checked that yet. I will try to check it after work tomorrow.

yours sincerely
7
Twain Lib / Re: Auto Initialization
« Last post by MorneW on September 22, 2016, 02:35:38 PM »
Any Feedback yet?
8
Twain Lib / Re: Auto Initialization
« Last post by MorneW on September 21, 2016, 07:58:10 PM »
This works for selecting a default scanner and not having to select it over and over again but is there a way for the scanning to automatically start, i.e. not having to select any scanning settings like flatbed or feeder, and those types of things
9
Twain Lib / Re: Auto Initialization
« Last post by mkaatr on September 21, 2016, 05:12:29 AM »
Hi there...

Check the video here: http://mkasoft.com/easy-coding/35-access-twain-v3
10
Twain Lib / Auto Initialization
« Last post by MorneW on September 20, 2016, 07:13:32 PM »
Is it possible to initialize the Twain Lib and automatically take the default selected scanner and also default settings instead of having the user select the scanner and settings?
Pages: [1] 2 3 ... 10