Mmkay; I tested with changing the text of a label, and the
segment of
code isn't even getting executed. That would explain it!
Here's the context of the full function. I don't understand
the event
to begin with, so I'm stuck as to how to get the switch for
TransferReady to execute:
bool IMessageFilter.PreFilterMessage(ref Message m)
{
TwainCommand cmd = incoming.PassMessage(ref m);
if (cmd == TwainCommand.Not)
return false;
switch (cmd)
{
case TwainCommand.CloseRequest:
{
EndingScan();
incoming.CloseSrc();
break;
}
case TwainCommand.CloseOk:
{
EndingScan();
incoming.CloseSrc();
break;
}
case TwainCommand.DeviceEvent:
{
break;
}
case TwainCommand.TransferReady:
{
lblStatus.Text = "Receiving
Data...";
ArrayList pics =
incoming.TransferPictures();
EndingScan();
incoming.CloseSrc();
picnumber++;
for (int i = 0; i < pics.Count;
i++)
{
IntPtr img = (IntPtr)pics[i];
IntPtr bmpptr = PicForm
.GlobalLock(img);
Bitmap b =
DibToImage.WithStream(bmpptr);
//IntPtr bmpptr =
PicForm.GlobalLock( img
);
//IntPtr pixptr =
PicForm.GetPixelInfo( bmpptr );
//Bitmap b =
Gdip.GdipCreateBitmapFromGdiDib(bmpptr, pixptr);
//Gdip.GlobalFree(bmpptr);
pbSample.Image = b;
}
break;
}
}
return true;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharp googlegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups-beta.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---
|