TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Reply To: how to set the resolution in code?

Forums › TWAIN Classic › how to set the resolution in code? › Reply To: how to set the resolution in code?

December 18, 2007 at 3:01 pm #24222
gabe
Participant
  • Topics - 9
  • Replies - 583
  • Total Posts - 592

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;

}

Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in