Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
Print
(untagged)

PDA / Pocket PC Signature Capturing and Saving as BMP

0.00/5 (No votes)
1 Feb 2008 1  
A way to capture signature on Pocket PC and saving as BMP file

Introduction

This control class allows a user to take a signature, and save it as BMP file in the Pocket PC.

Background

I was looking for a free Signature control written in VB.net but did not find any help regarding that, but I found an article on codeproject.com regarding capturing the signatures but it was written in C# (you can find the article here). So I decided to use the idea and write the code again in VB.net in a pretty simple way so that it will be more easy and useable for everyone.

Using the code

add reference

VB.NET
Imports cetestapp.SignaturePDA

declare these two as global variables

VB.NET
//
Private cSignature As New Sigature
Private AppPath As String = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)
//
        

Add following code to your form load event

VB.NET
cSignature.Location = pnlSignature.Location
cSignature.Size = pnlSignature.Size
Me.Controls.Add(cSignature)
cSignature.Clear(True)
Cursor.Current = Cursors.Default
cSignature.SetPenColor(Color.Blue)
cSignature.Focus()

On save button click event add the following code snippt

VB.NET
'Save to a File

Cursor.Current = Cursors.WaitCursor
cSignature.Save(Path.Combine(AppPath, "CapturedSignature1.bmp"))
Cursor.Current = Cursors.Default

On clear button click event add this

VB.NET
cSignature.Clear(True)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here