473,414 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Windows Image Acquisition 2.0

hi all,

i try to use WIA 2.0 for my project which use scanner, it works fine..but i'm don't know how to detect wether the scanner is connected to the pc or not. i like to prompt a message when the program found that there is no scanner connected to the pc. Could anyone help me=)..anyway, i found this code somewhere but its not working. Please help me

DeviceManager manager = new DeviceManagerClass();
foreach (DeviceInfo info in manager.DeviceInfos)
{
if (info.Type == WiaDeviceType.ScannerDeviceType)
{
DetectScanner = info.Connect();
break;
}
else
{
scanStatus = 1;
MessageBox.Show(this, "Scanner not found! Please make sure the scanner is switched on and connected properly!", "Scanner", MessageBoxButtons.OK, MessageBoxIcon.Stop);
this.Close();
return;
}
}
Oct 4 '07 #1
0 1238

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: dicky2283 | last post by:
windows development community please help me im deepak roy , doing my final year undergrad in computer science.... im doing a project - Motion detection and Tracking in vc++( video for...
1
by: Ryan Melville | last post by:
Hi, I need to use WIA (Windows Image Acquisition) from managed C++. Is there a "new and improved" way to access WIA from managed C++ (i.e., through .net)? Or, is it the same COM calls as from...
3
by: Bob | last post by:
Gidday, Anyone in here used WIA before? I want to be able to connect to a digital camera via USB and access the images. I was hoping WIA would be all I need but it doesn't see my camera (Sony...
6
by: Bob | last post by:
Hi, Can anybody who has used Windows Image Acquisition library 2.0 for XP tell me how to get it to scan ALL documents loaded in the document feeder of a scanner. I have only ever used it to do...
19
by: **Developer** | last post by:
When I get the image from the file the file remains locked so the Delete fails with a "used by another process" So I tried using a clone and disposing the obtained image. But that didn't fix...
3
by: Roberto Hernández | last post by:
I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but it takes only back photos and also at low resolution. How can I put ther resolution at 640x480? I have a Labtec webcam...
3
by: Nicholas Lee | last post by:
I am using Visual Studio 2005 and wish to program using managed C++ code. I am writing an application to take still images from a webcam. I have created an interop 'reference' to the platform...
113
by: dan | last post by:
For writing a Windows desktop application, how much harder is it to use the Windows C API than C#/.NET, assuming the coding is done in an editor? What specific aspects were more difficult? I'm...
0
by: tavares | last post by:
--------------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) Symposium...
0
by: tavares | last post by:
----------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) International ECCOMAS Thematic...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.