🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21521

WIA SKANER

#21521
From: news.gazeta.pl
Date: Fri, 28 May 2010 21:17
35 lines
1914 bytes
Witam
Próbuje uruchamiać skaner z aplikacji.
Poniżej fragment kodu - działa ale uruchamia się okno dialogowe do wyboru 
ustawień. Jak pzrerobić aby automatycznie rozpoczynało się skanowanie z 
ustawionymi parametrami. Chyba do tego jest metoda TakePicture ale nie mogę 
sobie poradzić z zastosowaniem tego

Z góry dziekuję za pomoc
WiaClass hardware = new WiaClass();

object UzyjUI = System.Reflection.Missing.Value;

ItemClass device = (ItemClass)hardware.Create(ref UzyjUI);

ItemClass data = null;

Collection image = 
device.TakePicture().GetItemsFromUI(WiaFlag.SingleImage,WiaIntent.ImageTypeColor);

data = (ItemClass)Marshal.CreateWrapperOfType(image[0], typeof(ItemClass));

string FilePath = "d:/test.jpg";

data.Transfer(FilePath, false);


S.M. 



__________ Informacja programu ESET NOD32 Antivirus, wersja bazy sygnatur wirusow 5152 (20100528) __________

Wiadomosc zostala sprawdzona przez program ESET NOD32 Antivirus.

http://www.eset.pl lub http://www.eset.com 
Technical Details
Message-ID: <htpbt1$r93$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "news.gazeta.pl" <szymon.mitek@gazeta.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: WIA SKANER
Date: Fri, 28 May 2010 23:17:56 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 39
Message-ID: <htpbt1$r93$1@inews.gazeta.pl>
NNTP-Posting-Host: ip-093157113100.mikolow.multimetro.pl
X-Trace: inews.gazeta.pl 1275081441 27939 93.157.113.100 (28 May 2010 21:17:21 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 28 May 2010 21:17:21 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-User: szymonm77
X-EsetScannerBuild: 7203
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit