capture stylus writings from C# panel

543 views Asked by At

Trying to implement stylus writing on a windows form. I'm trying this example from codeproject.

I need to capture what ever user has wrote on the forms control. I have tried the following code

Bitmap bmp = new Bitmap(gbTestArea.Width, gbTestArea.Height);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(PointToScreen(gbTestArea.Location), new Point(0, 0), gbTestArea.Size);

gbTestArea.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
bmp.Save(@"c:\someImage.Jpeg", ImageFormat.Jpeg);

But the problem is its not spitting out what ever was written on the form, it show only the empty control(group box in this example). My final goal is to capture what ever user has written on the forms control. Any suggestion will be appreciated, thanks in advance.

0

There are 0 answers