Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Signature capture and label autosize


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2007, 06:27 AM
Junior Member
 
Join Date: Jun 2007
Posts: 19
Default Signature capture and label autosize

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.
Reply With Quote
  #2 (permalink)  
Old 06-26-2007, 07:06 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

1. You will have to implement it yourself.
What do you need to do with the signature? (Save it, try to match it...).
2. You could use a multiline textbox (or a regular textbox) or a label.
You can measure the string length and height using the ImageLib library. I'm doubtful that it is really needed.
Reply With Quote
  #3 (permalink)  
Old 06-26-2007, 02:33 PM
Junior Member
 
Join Date: Jun 2007
Posts: 19
Default 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.
Reply With Quote
  #4 (permalink)  
Old 06-26-2007, 05:41 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,313
Default

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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #5 (permalink)  
Old 06-26-2007, 05:53 PM
Junior Member
 
Join Date: Jun 2007
Posts: 19
Default

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
Reply With Quote
  #6 (permalink)  
Old 06-26-2007, 05:56 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 636
Default

Hi,

Quote:
Originally Posted by Cableguy View Post
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 ...

but here it is again ...


specci48
Attached Files
File Type: zip Notes-Draw.zip (60.6 KB, 33 views)
Reply With Quote
  #7 (permalink)  
Old 06-26-2007, 06:33 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You could use the ImageLibEx library (requires .Net CF 2.0) to save the image:
Saving an image to a file
Reply With Quote
  #8 (permalink)  
Old 06-26-2007, 10:45 PM
Junior Member
 
Join Date: Jun 2007
Posts: 19
Default

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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture basic drawings? tsteward Questions & Help Needed 14 08-19-2008 03:40 PM
Capture name of control that has focus aerohost Questions & Help Needed 5 06-21-2008 11:31 PM
Desktop Videocam image capture library agraham Additional Libraries 6 05-25-2008 11:00 AM
Screen Capture App sahoopes Share Your Creations 3 04-17-2008 08:05 AM
Label or no label kavka Questions & Help Needed 1 03-18-2008 07:06 AM


All times are GMT. The time now is 11:24 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0