Click here to Skip to main content
15,908,437 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Percentage Pin
Dalek Dave20-May-10 21:10
professionalDalek Dave20-May-10 21:10 
AnswerRe: Percentage Pin
The Man from U.N.C.L.E.21-May-10 2:19
The Man from U.N.C.L.E.21-May-10 2:19 
QuestionText Not Showing Fine Pin
Anubhava Dimri20-May-10 19:32
Anubhava Dimri20-May-10 19:32 
AnswerRe: Text Not Showing Fine Pin
DaveAuld20-May-10 19:37
professionalDaveAuld20-May-10 19:37 
GeneralRe: Text Not Showing Fine Pin
Anubhava Dimri20-May-10 19:53
Anubhava Dimri20-May-10 19:53 
GeneralRe: Text Not Showing Fine Pin
Johnny J.21-May-10 1:39
professionalJohnny J.21-May-10 1:39 
GeneralRe: Text Not Showing Fine Pin
Anubhava Dimri27-May-10 20:18
Anubhava Dimri27-May-10 20:18 
QuestionScanner - image scanning! Pin
FeRtoll20-May-10 13:10
FeRtoll20-May-10 13:10 
i am trying to convert c# to vb.net of this project!

.NET TWAIN image scanner[^]

i did it and it works on select source, and scan preview but not when i click scan then it throws me error "Arithmetic operation resulted in an overflow." in winmsga.x = CShort(pos)

much of code! Frown | :(

here is what i have done:

TwainLib[^]
Twain[^]
GDIPlusLib[^]
And my form[^]

only two things got errors when i converted code!

first one is:

<StructLayout(LayoutKind.Sequential, Pack:=4)> _
        Friend Structure WINMSG
            Public hwnd As IntPtr
            Public message As Integer
            Public wParam As IntPtr
            Public lParam As IntPtr
            Public time As Integer
            Public x As Integer
            Public y As Integer
        End Structure

and
Private winmsg As WINMSG

so i just renamed it to winmsga maybe i did something wrong here?

and other error was:
Protected Function GetPixelInfo(ByVal bmpptr As IntPtr) As IntPtr
        bmi = New BITMAPINFOHEADER()
        Marshal.PtrToStructure(bmpptr, bmi)

        bmprect.X = InlineAssignHelper(bmprect.Y, 0)
        bmprect.Width = bmi.biWidth
        bmprect.Height = bmi.biHeight

        If bmi.biSizeImage = 0 Then
            bmi.biSizeImage = ((((bmi.biWidth * bmi.biBitCount) + 31) And Not 31) >> 3) * bmi.biHeight
        End If

        Dim p As Integer = bmi.biClrUsed
        If (p = 0) AndAlso (bmi.biBitCount <= 8) Then
            p = 1 << bmi.biBitCount
        End If
        p = (p * 4) + bmi.biSize + CInt(bmpptr)
        Return New (p,IntPtr) 'so i made like this (Return New System.IntPtr(p))
    End Function


can annyone help?

thanks!
FeRtoll Software.net
------------
E-Mail me
WebPage

AnswerRe: Scanner - image scanning! Pin
FeRtoll20-May-10 14:36
FeRtoll20-May-10 14:36 
GeneralRe: Scanner - image scanning! Pin
Wayne Gaylard20-May-10 20:16
professionalWayne Gaylard20-May-10 20:16 
GeneralRe: Scanner - image scanning! Pin
FeRtoll21-May-10 3:53
FeRtoll21-May-10 3:53 
Questionanimation? Pin
Adam Wike20-May-10 4:53
Adam Wike20-May-10 4:53 
AnswerRe: animation? Pin
Luc Pattyn20-May-10 5:27
sitebuilderLuc Pattyn20-May-10 5:27 
GeneralRe: animation? Pin
Adam Wike20-May-10 8:29
Adam Wike20-May-10 8:29 
AnswerRe: animation? Pin
Christian Graus20-May-10 5:46
protectorChristian Graus20-May-10 5:46 
GeneralRe: animation? Pin
Adam Wike20-May-10 8:28
Adam Wike20-May-10 8:28 
GeneralRe: animation? Pin
FeRtoll20-May-10 13:11
FeRtoll20-May-10 13:11 
Questioncontext menu for CD drive Pin
phowarso20-May-10 0:19
phowarso20-May-10 0:19 
AnswerRe: context menu for CD drive Pin
Johnny J.20-May-10 0:28
professionalJohnny J.20-May-10 0:28 
AnswerRe: context menu for CD drive Pin
Johan Hakkesteegt20-May-10 0:46
Johan Hakkesteegt20-May-10 0:46 
AnswerRe: context menu for CD drive Pin
JR21220-May-10 1:41
JR21220-May-10 1:41 
QuestionDate string conversion problem Pin
TheComputerMan19-May-10 15:55
TheComputerMan19-May-10 15:55 
AnswerRe: Date string conversion problem Pin
Luc Pattyn19-May-10 16:20
sitebuilderLuc Pattyn19-May-10 16:20 
GeneralRe: Date string conversion problem Pin
Dalek Dave19-May-10 21:54
professionalDalek Dave19-May-10 21:54 
GeneralRe: Date string conversion problem Pin
TheComputerMan19-May-10 22:39
TheComputerMan19-May-10 22:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.