473,789 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select TWAIN Source (VB.NET 2005)

I'm hoping there is a TWAIN expert lurking here somewhere :)

I'm writing a very customized application. The software will be set up
in multiple location and will always have two types of scanners attached
to the computer. The scanners are microfilm/fiche and a flatbed.

So I've created a scanner setup screen where the user can select the
twain source for the fiche/film scanner and the twain source for the
flatbed scanner. I'm using an active x control to select the twain
source so that is simple enough, the problem comes in storing that
source or setting it manually. There is no way to do this in my active x
control.

Can someone tell me how this might be done in VB.NET? Basically, on the
main form there is a radio button for Fiche/Film and one for Flatbed. I
would like to programatically set the twain source depending on which
radio button is checked.

Help please! :)
Mar 30 '06 #1
4 9799
Looks like you are lucky : just some some translation work ;)

http://www.codeproject.com/dotnet/twaindotnet.asp
Dustin Davis ha scritto:
I'm hoping there is a TWAIN expert lurking here somewhere :)

I'm writing a very customized application. The software will be set up
in multiple location and will always have two types of scanners attached
to the computer. The scanners are microfilm/fiche and a flatbed.

So I've created a scanner setup screen where the user can select the
twain source for the fiche/film scanner and the twain source for the
flatbed scanner. I'm using an active x control to select the twain
source so that is simple enough, the problem comes in storing that
source or setting it manually. There is no way to do this in my active x
control.

Can someone tell me how this might be done in VB.NET? Basically, on the
main form there is a radio button for Fiche/Film and one for Flatbed. I
would like to programatically set the twain source depending on which
radio button is checked.

Help please! :)


Mar 31 '06 #2
And here's a link to the VB.NET version:

http://www.planetsourcecode.com/vb/s...1551&lngWId=10

(works too)
james
<to************ **@uniroma1.it> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
Looks like you are lucky : just some some translation work ;)

http://www.codeproject.com/dotnet/twaindotnet.asp
Dustin Davis ha scritto:
I'm hoping there is a TWAIN expert lurking here somewhere :)

I'm writing a very customized application. The software will be set up
in multiple location and will always have two types of scanners attached
to the computer. The scanners are microfilm/fiche and a flatbed.

So I've created a scanner setup screen where the user can select the
twain source for the fiche/film scanner and the twain source for the
flatbed scanner. I'm using an active x control to select the twain
source so that is simple enough, the problem comes in storing that
source or setting it manually. There is no way to do this in my active x
control.

Can someone tell me how this might be done in VB.NET? Basically, on the
main form there is a radio button for Fiche/Film and one for Flatbed. I
would like to programatically set the twain source depending on which
radio button is checked.

Help please! :)

Mar 31 '06 #3
Sorry, I've looked at these already and the code connect to a dll, which
also shows the dialog to select the TWAIN source. I still couldn't find
a way to select the TWAIN source without showing the dialog box.

The system seems to remember the last TWAIN source selected. Does anyone
know where it stores this information. I was thinking that if there were
an ascii file somewhere, or a registry setting, I could modify that...

james wrote:
And here's a link to the VB.NET version:

http://www.planetsourcecode.com/vb/s...1551&lngWId=10

(works too)
james
<to************ **@uniroma1.it> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
Looks like you are lucky : just some some translation work ;)

http://www.codeproject.com/dotnet/twaindotnet.asp
Dustin Davis ha scritto:
I'm hoping there is a TWAIN expert lurking here somewhere :)

I'm writing a very customized application. The software will be set up
in multiple location and will always have two types of scanners attached
to the computer. The scanners are microfilm/fiche and a flatbed.

So I've created a scanner setup screen where the user can select the
twain source for the fiche/film scanner and the twain source for the
flatbed scanner. I'm using an active x control to select the twain
source so that is simple enough, the problem comes in storing that
source or setting it manually. There is no way to do this in my active x
control.

Can someone tell me how this might be done in VB.NET? Basically, on the
main form there is a radio button for Fiche/Film and one for Flatbed. I
would like to programatically set the twain source depending on which
radio button is checked.

Help please! :)


Mar 31 '06 #4
So, using Filemon & Regmon
(http://www.sysinternals.com/Utilities/Regmon.html) I was able to find a
registry entry for the default TWAIN source. On my machine it is located at
HKCU\Software\M icrosoft\Window s NT\CurrentVersi on\Twain\Defaul t Source

Now this begs the question, how can I determine where it would be
located on Win XP or other OS versions? And how do I read & write to the
registry in VB.NET?

Dustin Davis wrote:
Sorry, I've looked at these already and the code connect to a dll, which
also shows the dialog to select the TWAIN source. I still couldn't find
a way to select the TWAIN source without showing the dialog box.

The system seems to remember the last TWAIN source selected. Does anyone
know where it stores this information. I was thinking that if there were
an ascii file somewhere, or a registry setting, I could modify that...

james wrote:
And here's a link to the VB.NET version:

http://www.planetsourcecode.com/vb/s...1551&lngWId=10
(works too)
james
<to************ **@uniroma1.it> wrote in message
news:11******** **************@ t31g2000cwb.goo glegroups.com.. .
Looks like you are lucky : just some some translation work ;)

http://www.codeproject.com/dotnet/twaindotnet.asp
Dustin Davis ha scritto:

I'm hoping there is a TWAIN expert lurking here somewhere :)

I'm writing a very customized application. The software will be set up
in multiple location and will always have two types of scanners
attached
to the computer. The scanners are microfilm/fiche and a flatbed.

So I've created a scanner setup screen where the user can select the
twain source for the fiche/film scanner and the twain source for the
flatbed scanner. I'm using an active x control to select the twain
source so that is simple enough, the problem comes in storing that
source or setting it manually. There is no way to do this in my
active x
control.

Can someone tell me how this might be done in VB.NET? Basically, on the
main form there is a radio button for Fiche/Film and one for Flatbed. I
would like to programatically set the twain source depending on which
radio button is checked.

Help please! :)


Mar 31 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2405
by: Jeff Lindholm | last post by:
I have a project that is capturing pictures from my web cam. I can save the image to a file and load it back from the file into my image control no problem. But I would like to either load it into the image control directly, or into/out of a stream. Given the GdipSaveImageToStream definition how do I create a parameter for the stream parameter, that gets me a usable stream when it is all done?
5
6899
by: Daniel Wetzler | last post by:
Dear MSSQL experts, I use MSSQL 2000 and encountered a strange problem wqhile I tried to use a select into statement . If I perform the command command below I get only one dataset which has the described properties. If I use the same statement in a select into statement (see the second select) I get several datasets with the described properties like I didn't use distinct
8
4290
by: RAM | last post by:
Hello, I am learning SQL Server 2005. I need to know how to make a backup of a database. I tried (according to my book): BACKUP DATABASE DemoSQLServer TO DISK = "G:\DemoSQLServer.bak" But I got error: Incorrect syntax near 'G:\DemoSQLServer.bak'. Please help. Thank you very much. /RAM/
2
2029
by: john | last post by:
Hi to All, Our all data source object are defined in a separate assembly than UI. When I start designing a new Crystal Report a dialog pops up and asks for data source. Unfortunately it lists only the datasets and objects from the actual project from the solution. How can we select the datasource from a referenced assembly? thx for the answers
9
2623
by: Gabriel | last post by:
Hello, I installed SQL server 2005 SP1 on a Windows XP SP2 From Visual Studio, I'm trygin to create a connection to a database, but I receive this error but I'm creating the connection (I don't receive the database list in the dropdown) "An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that
0
1099
by: Lisa Coal | last post by:
I am using the Insert database command several times in a visual basic macro. Every time I use the command in the macro the Select Data Source screen appears even though the source is set in the command as shown below. How do I prevent this screen from appearing? Selection.Range.InsertDatabase LinkToSource:=True, _ Connection:="Provider=SQLOLEDB.1;Integrated Security=SSPI;Server=fccqt02;Database=Blue_South;", _ ...
0
2560
by: mzodell | last post by:
Running Access 2003 with a database in 2000 file format and noticed that the search results differ depending on what version of Access is in use. Users running Access 2000 are able to call the find function to search for a record in a field that displays a location but is populated by a location code. When the user enters the location code, the search will return a record with matching location. Running the same database in Access 2003...
4
4926
by: Chloe C | last post by:
Hi I've got an Ingres database of some 200 tables which I need to import every night into SQL Server 2005 for use by Reporting Services. Most of the tables will come across unchanged (a few need massaging to handle time intervals correctly), but the Import Wizard only seems to want to import one table (or more accurately query) at a time. I seem to remember the old 2000 Import Wizard handled multiple tables - is there any way of...
2
17458
by: MLH | last post by:
Am using A97. Have defined Machine Data Source type DSNs in Access' File, Get External Data, Link Tables, Files of Type ODBC, Machine Data Source tab. Have many definitions. Would like to delete some. Would like to edit some. How to delete? I don't think editing is possible.
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.