By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,481 Members | 979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,481 IT Pros & Developers. It's quick & easy.

Select TWAIN Source (VB.NET 2005)

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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.googlegr oups.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

P: n/a
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.googlegr oups.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

P: n/a
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\Microsoft\Windows NT\CurrentVersion\Twain\Default 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.googlegr oups.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 discussion thread is closed

Replies have been disabled for this discussion.