Signature capture and label autosize

ohkovar

Member
Licensed User
Two quick questions:

1. Is there a way to capture an electronic siganture in B4PPC? I need our healthcare app to allow the user to "sign" their name using the stylus/touchscreen option on the PDA, but I haven't seen any function or .dll that allows for this.

2. I am pulling questions from a sqlite database and having them populate a lable control on a form. What is the best way to have the label (or it could be a textbox or other control) automatically re-size to fit the content? If that is not possible, what is the best way to create a lable or control with dynamic text?

Thanks for any help you can give.
 

ohkovar

Member
Licensed User
Save the signature

1. I just need to save the signature in a sqlite database. No verification or matching is needed, just need to capture the signature from the stylus. Do you know of a good way, or third party .dll, that will help with this?

2. The reason I need the automatic sizing of the labels is because this program will be deployed on 1,000 machines and the program will be updated regularly with new questions. The questions will be stored in a sqlite database and then displayed one by one on the PDA screen (that is the "short" version!). Since I will not know the size of the questions that will be used in the future, I need to know dynamically how large the question is in order to properly fit it on the screen.

Thanks again for the help.
 

Cableguy

Expert
Licensed User
Longtime User
There was a user app posted some time ago that captured drawn notes to a bmp(?) file,maybe that helps???
 

ohkovar

Member
Licensed User
I think I am on the right track with the signature capture. I am using the MouseMove feature in the ImageLib library to capture the starting point and ending point of the stylus and then draw the line using those coordinates. Right now, I have the coordinates posting to a textbox. Now, I just need to delimit the coordinates so that I can parse those to re-create the signature. Here is what I have so far in case anyone is interested:

Sub Globals
OldX = ""
OldY = ""
End Sub

Sub App_Start
Form1.Show
drawer.New1("Form1",false)
pen1.New1 (cBlue)
End Sub

Sub Form1_MouseDown(X , Y )
OldX = X
OldY = Y
End Sub

Sub Form1_MouseMove(X , Y )
If OldX = "" Then OldX = X
If OldY = "" Then OldY = Y
If Not(OldX = X AND OldY = Y) Then
drawer.DrawLine(pen1.Value, OldX, OldY, X, Y)
drawer.Refresh(0,0,240,80)

'tb1 is the textbox on Form1
tb1.Text = tb1.Text & OldX & OldY & X & Y
End If
OldX = X
OldY = Y
End Sub
 

specci48

Well-Known Member
Licensed User
Longtime User
Hi,

There was a user app posted some time ago that captured drawn notes to a bmp(?) file,maybe that helps???

I think the post was on the old forum ... :sign0148:

but here it is again ... ;)


specci48
 

Attachments

  • Notes-Draw.zip
    60.6 KB · Views: 237

ohkovar

Member
Licensed User
Thanks guys. I have it working now. I used the code above and then I have two options for storing the image - either as a set of coordinates that I can then re-create an image from or using the ImageLibEx library to save the file as an image. I am testing both to see which is more efficient. Thanks for all of the help.
 

DKnowles

Member
Licensed User
Longtime User
Which was the most efficent method of storing the signature?

Thanks guys. I have it working now. I used the code above and then I have two options for storing the image - either as a set of coordinates that I can then re-create an image from or using the ImageLibEx library to save the file as an image. I am testing both to see which is more efficient. Thanks for all of the help.

Doing the same thing in my Legionella Assesment application, but my data is sent back to the server via a post, so did you deside was the smallest file size ?

David
 

mjcoon

Well-Known Member
Licensed User
I come a bit late to this thread, but I'm somewhat surprised that attaching digitised signatures to data is considered significant.

After all, they are too easily replicated and "attached" to any old data. Plagiarism allied with identity theft, you might say, in a new and perfect form of forgery.

In the digital age, digital signatures are more satisfactory. They can be verified as being created by the putative signatory and shown as being related mathematically to the actual content of the document.

But they do require a "public key infrastructure" for validation...

Mike.
 

Smee

Well-Known Member
Licensed User
Longtime User
me late too,

However i have also considered capturing signatures for some future apps. It will be intersting to see how this pans out, i would love to see some code. Hint:sign0060:

i have seen quite a few apps that use digital signatures and as correctly pointed out these can be forged it does not however seem to worry the ppl thast use these programs
 
Top