コード例 #1
0
        void CreateContext(ref string name)
        {
            if (Tablet.GetCtxHandleByName(ref name) == IntPtr.Zero)
            {
                Tablet.AddContext(name, ref digitizing);
                Tablet.SelectContext(ref name);
                Tablet.Context.Options.IsPenCtx           = Tablet.Context.Options.IsSystemCtx = true;
                Tablet.Context.Options.NotifyCursorChange = true;

                Tablet.Connected = true;

                Tablet.Context.OutputExtentX = Tablet.Context.InputExtentX;
                Tablet.Context.OutputExtentY = Tablet.Context.InputExtentY;
                Tablet.Context.Update();
            }
        }
コード例 #2
0
        private void connectToDevice()
        {
            IntPtr Hwnd;
            bool   IsDigitizingContext = false;
            string ContextID           = "FirstContext";

            // Connect.Enabled = false;
            //Disconnect.Enabled = true;
            // Enable.Enabled = true;
            //Disable.Enabled = false;
            //chkDigitise.Enabled = true;//Enable Digitize Mode
            Hwnd           = this.Handle;
            Digitizer.hWnd = Hwnd;
            Digitizer.AddContext(ContextID, ref IsDigitizingContext);
            Digitizer.SelectContext(ref ContextID);
            Digitizer.Connected         = true;
            Digitizer.Context.QueueSize = 32;//Set queue size to a reasonable value
        }