TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Sun May 20, 2012 4:08 pm




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: obtaining the index of the selected source
PostPosted: Wed Jun 22, 2005 3:06 pm 
Offline

Joined: Wed Jun 22, 2005 2:55 pm
Posts: 3
Location: Rockhampton, QLD, Australia
Morning all

I am trying to obtain the index of the selected source.

Code:
private AxDYNAMICTWAINCTRLLib.AxDynamicTwain dt;
dt.SelectSource();
debug.printDebug("Name of selected scanner = " + dt.CurrentSourceName);
debug.printDebug("Index of selected scanner = " + dt.??????????????);


Cheers PJ

_________________
--
Breathe
--


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 23, 2005 4:49 am 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
Hi,

Currently Dynamic TWAIN does not provide the property to return the index of the selected source.

However, you can obtain the index of the selected source from iIndex in the following code:

Code:
int iIndex;
for (int i=0; i<dt.SourceCount; i++)
{
  if (dt.get_SourceNameItems(i)==dt.CurrentSourceName())
    {
       iIndex=i;
       break;
    }
}


Thanks.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 23, 2005 2:23 pm 
I was afraid you were going to reply with something to that effect. It is how I have solved it for the time being.

Cheers PJ


Top
  
 
 Post subject:
PostPosted: Thu Jun 23, 2005 7:27 pm 
Offline
User avatar

Joined: Mon Mar 07, 2005 11:11 pm
Posts: 866
Hi,

Sorry. At present this is the way it can be solved.

Thanks for your time.

_________________
Robert
TWAIN Support Team
http://www.dynamsoft.com/
TWAIN ActiveX/Plug-in HTTP Control/SDK & TWAIN ActiveX Control, Scanner SDK, Component
Software Configuration Management | SCM Solution


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

It is currently Sun May 20, 2012 4:08 pm


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog