Questions tagged [pen]
118 questions
5
votes
5 answers
WPF Stylus Events when Stylus/Pen is away from the screen
Is it possible to react (via StylusButtonDown etc., or alternatives) to button presses (i.e. one of the stylus buttons, not buttons in some app) that happen when the stylus/pen is not touching the screen, i.e. hovering in the air somewhere in range…

TravisG
- 2,373
- 2
- 30
- 47
5
votes
1 answer
How To Program in Delphi for Microsoft's Surface Pen?
I'd like to integrate surface pen capabilities into my application. It's written using Delphi 10 Seattle. I've searched all over the web and can't find anything.
Does anyone know how to program for the Pen? Specifically, to capture the pressure…

Steve Maughan
- 1,174
- 3
- 19
- 30
5
votes
1 answer
Tips for developing Penlets
Finally I have time to do some projects for fun. I want to write some app for my new Livescripe Pulse smart pen.
Has anybody out there already written something like this? Do You have any tips for beginner or useful links? I am having trouble…

Maciek Sawicki
- 6,717
- 9
- 34
- 48
4
votes
2 answers
How to draw interactively with Pen on a Morph in Squeak?
It can't get the Pen to work properly in a Morph.
I arrived at the snippet below but I don't understand how to update the view of the Morph after I moved the pen. I tried to send "changed" in various (sm, pen, (sm owner)) object but it does not…

Nicola Mingotti
- 860
- 6
- 15
4
votes
4 answers
Why does use of pens with dash patterns cause huge (!) performance degredation in WPF custom 2D drawing?
Hope anyone can shed light on this so I can use pens with dash patterns?
I am writing a scrollable chart (a Panel inside ScrollViewer that implements IScrollInfo) in WPF using DrawingVisual's DataContext.DrawX. I have several thousand…
user65199
4
votes
1 answer
Check if USB device is idling, LINUX
I've got a quick question, but I can't find an answer.
Is it possible in linux (or in python) to see if an external usb pen drive is idling?
I need to know this for a python script I'm writing.
I need to rename a folder on an external usb pen drive…

Bosiwow
- 2,025
- 3
- 28
- 46
4
votes
5 answers
How to draw a line in VB.NET
I am trying to draw a simple line with VB.NET.
My code is as below, however when I run the code, only the form is shown up! There is no line.
What did I do wrong here?
Public Class Form1
Dim pen As System.Drawing.Graphics
Private Sub…

N.T.C
- 658
- 2
- 9
- 20
4
votes
3 answers
Non-scaling Pen in GDI+
I need to create a pen which draws with a width of 0.5 mm regardless of the scale of the graphics transformation matrix. Here is what I am doing:
Note: The sample code is C++/CLI but answers using C# are welcome.
// assume that g is a Graphics…

Agnel Kurian
- 57,975
- 43
- 146
- 217
3
votes
0 answers
Emulating Pen Touch Events in Chrome
Is there a way to emulate pen events (pointerdown, pointerup, pointermove) using the dev tools?
it seems there is only a way to emulate hand touches but not pen touches.

Gal Ep
- 101
- 1
- 7
3
votes
2 answers
USB HID pen requirements
Is there a USB HID pen driver in Windows Vista?
If so, what are the requirements for USB descriptors, in order to make Windows Vista recognize the pen and load the pen driver?
What I'm searching for is the pen equivalent to the HID mouse driver,…
Øystein
3
votes
0 answers
How to get accurate Java Swing mouse events on a Microsoft pen device?
Has anyone found a solution to timing of Java Swing mouse events on a Surface Pro or other Microsoft Wacom pen platform?
The goal is to create responsive pen stroke input in a draw type application, including at the start of a stroke.
This problem…

user1792609
- 301
- 1
- 3
- 8
2
votes
2 answers
.net drawlines with pens(different colors) in a loop
I want to draw lines ( about 100 ) with different colors. The lines will draw in a loop and get random colors. Here is my code:
for( int i = 0; i < 100 < i++ )
{
srand( time(NULL) );
int index = rand() % 99;
Pen^ my_pen = gcnew…

user983924
- 395
- 2
- 10
- 23
2
votes
2 answers
System.Drawing.Pen bug?
I'm new here so I hope my message will be clearly editted...
I tried to show you a very explaining picture here, but new users are not allowed to post images. Well, in words then: I draw 3 lines of exactly 10 centimeter when printed on paper or to…

Paul H.
- 21
- 3
2
votes
1 answer
Convert handwritten input to a collection of geometry on a canvas
I am developing a Windows app that runs on computers with a pen input. I have a canvas object that receives an event every time the pen has moved to know where exactly it is on the canvas, the pressure on the pen, etc etc, and the canvas itself can…

frogstair
- 444
- 5
- 20
2
votes
0 answers
HTML5 Canvas with Apple Pen - Only works with (position: absolute;)
I'm using this code to enable Apple Pencil to work on HTML5 Canvas. It works perfectly with it's default css but the moment I change position:absolute it stops working. The pen strokes do not line up with what's drawn on the screen.
I've been trying…

Paul Walker
- 73
- 7