- This topic has 1 reply, 2 voices, and was last updated 13 years, 1 month ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
Forums › TWAIN Classic › how to set the resolution in code?
hai..
iam currently developing an image scanner application using twain.
iam following the net master’s code.
i want to change the resolution in my code.
how to change it?
please help me.
its urgent.
thank u.
that’s a tricky question if you’re really set on using netmaster’s code, but in opentwain (which is based on his codeproject interop sample) it would look like this:
public bool SetXResolution(double value)
{
Enumerations.Capability capID = Enumerations.Capability.Icap_XResolution;
DataStructures.twOneValue twOneVal = new DataStructures.twOneValue();
twOneVal.ItemType = DataStructures.twCapability.CapType(capID);
twOneVal.Item = value;
DataStructures.twCapability cap = new DataStructures.twCapability(capID, twOneVal);
bool retBool = OperationTriplets.Control.Capability.Set(cap);
return retBool;
}