Display arraylist in picturebox...
Posted on 2006-04-30
I'll try to explain this as best I can, so here it goes.
I have a scanned image that is normally transferred(displayed) in a new PicForm. I would like for this scanned image to be displayed in a new PictureBox instead. Anyhelp would be appreciated. Here is the code: This isn't all of the code that scans the image, etc because it would be way too much to paste in here.
Public Function PreFilterMessage(ByRef m As Message) As Boolean Implements IMessageFilter.PreFilterMessage
Dim cmd As TwainCommand = tw.PassMessage(m)
If (cmd = TwainCommand.Not) Then
Select Case cmd
Dim pics As ArrayList = tw.TransferPictures()
picnumber += 1
Dim i As Integer
For i = 0 To pics.Count - 1 Step 1
Dim img As IntPtr = CType(pics(i), IntPtr)
Dim newpic As PicForm = New PicForm(img)
newpic.MdiParent = Me
Dim picnum As Integer = i + 1
newpic.Text = "ScanPass" + picnumber.ToString() + "_Pic" + picnum.ToString()