public TwainHelper(Control ctr) { tw = new Twain(); this.ctr = ctr; frm = ctr.FindForm(); ctr.BackgroundImageLayout = ImageLayout.Stretch; tw.Init(ctr.Handle); }
public TwCapability(TwCap cap, short sval) { Cap = (short)cap; ConType = (short)TwOn.One; Handle = Twain.GlobalAlloc(0x42, 6); IntPtr pv = Twain.GlobalLock(Handle); Marshal.WriteInt16(pv, 0, (short)TwType.Int16); Marshal.WriteInt32(pv, 2, (int)sval); Twain.GlobalUnlock(Handle); }
public GetImageFormDevice() { InitializeComponent(); tw = new Twain(); tw.Init(this.Handle); }