[nsbasic-ce] Re: Signature Capture

2009-06-05 Thread Chris Kenworthy
--- In nsbasic...@yahoogroups.com, brianm...@... brianm...@... wrote:

 Hi
 
 Can anyone help me get started with a signature capture box. I am told the 
 picture box is the way to go but a few pointers would be greatly appreciated.
 
 Many thenks
 
 Brian

Hi Brian. Here's a few details about the way I did it.

- Dropped a picture box onto the form using the toolbox, named it PBox with the 
properties window.
- Added the following code lines to the form_load:
PBox.FillColor = RGB(255, 255, 255)
PBox.CreateImage PBox.Width, PBox.Height

- Used the following code to handle the actual drawing:

Sub FreeHand(X,Y)
   
   If curX  -1 And curY  -1 Then
   pbox.drawline CurX,CurY,X,Y,colorBlack,0,0
End If

'TempXY=TempXY  #  X  #  Y  
CurX=X
CurY=Y
End Sub

Sub pbox_mousedown(button, shift, X, Y)
CurX=X
CurY=Y  

Call FreeHand(X, Y)

pbox.refresh
End Sub

Sub pbox_mouseup(button, shift, X, Y)

Call FreeHand(X, Y)
pbox.refresh
End Sub

Sub pbox_mousemove(button, shift, X, Y)
 
Call FreeHand(X, Y)
pbox.refresh
End Sub

- Added 'clear' and 'save' buttons below the picture box, with the following 
code handlers:

Sub btnClearSig_Click
PBox.FillColor = RGB(255, 255, 255)
PBox.CreateImage PBox.Width, PBox.Height
End Sub

Sub btnSaveSig_Click
   sigID = nextSigID
   
   nextSigID = nextSigID + 1
   
   Dim filename, filepath, result
   
   filename = sigID  .bmp
   
   filepath = \My Documents\printouts\  filename
   result = PBox.SaveImageToFile(filepath, 0)
   
   cn.Execute insert into signatures values (  sigID  , '  filename  
')

Dim sql

cn.Execute sql

frmPrint_show
frmSig_hide

End Sub

nextSigID is a self-incrementing primary key field, and cn is my open SQLite 
object. 

Hope that this helps you out.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: SQL WHERE

2009-05-23 Thread Chris Kenworthy
What do you want to show up as output in this example? You're selecting 'every 
field in table namedb', so the msgbox command doesn't understand how to show 
all those fields, in potentially more than one record.

If you just want the first field, (firstname,) of the first record, then you 
could use code like:

cmd = select * from namedb where lastname = '  tbLastName.text  ' 
set r = db.execute (cmd)
val = r(1)(1)
msgbox val

If you want both firstname and lastname, you could change the val line to:
val = r(1)(1) r(1)(2)

Does this help? I think that you and Woody might have been talking at 
cross-purposes, because he was thinking of looping over a large result set, 
while you only wanted to pull a few values out of it.

I believe that using a single quote inside your cmd is better SQLite syntax 
than escaping a  by doubling it up.

--- In nsbasic...@yahoogroups.com, EMERSON VIER emersonv...@... wrote:

 Sorry I make mistake to write here I use this form
 
 cmd=SELECT * FROM NameDB WHERE  lastname =   tbLastName.Text  
 showStatus cmd
 Set r=db.Execute( cmd)
 MsgBox  r  
 
 How I get the result for this action?
 
 
 I use this database NameDB sample
 
 FirstName LastName
 
 Joe   Bob
 Henry Bill
 Tedy  Herman
 
 Thx for all
 EMERSON VIER
 
 
 
 
 --- In nsbasic...@yahoogroups.com, Harold Wood hwoody2wood@ wrote:
 
  you need a properly formatted query.
   
   
  select * from [table name goes here] where [column name goes here] = '  
  tbLastName.Text  '
  
  --- On Wed, 5/20/09, EMERSON VIER emersonvier@ wrote:
  
  
  From: EMERSON VIER emersonvier@
  Subject: [nsbasic-ce] SQL WHERE
  To: nsbasic...@yahoogroups.com
  Date: Wednesday, May 20, 2009, 10:16 PM
  
  
  
  
  
  
  
  
  How I found the last name on the sample on TN15
  I try
  
  cmd=SELECT * FROM WHERE NameDB lastname =   tbLastName.Text  
  showStatus cmd
  Set r=db.Execute( cmd)
  MsgBox  r  
  
  But this not return the line.
  
  EMERSON VIER
 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: Copying SQlite DB from Pc To Pocket PC

2009-03-03 Thread Chris Kenworthy
I believe that is the OLDER NewObjects sqlite object - version 
2.something. (The naming convention is disappointing, I agree.)

For the version 3 compatible object, I used:
AddObject newObjects.sqlite3.dbutf8,cn

So I suggest that you try that - with db at the end instead of cn 
so that it matches the rest of your code. I *think* that the sqlite3 
version is included with AXPack as well, though I'm not sure how to 
test this.


All of the tech notes on the NSBasic site appear to use the old 
sqlite progID. I believe that I got the sqlite3 one from the 
SQLite.nsb sample program that came NSB/CE 7.0.4 - that code is 
programmed to come up with a message of AXPack1 control not 
installed if the AddObject line errors.

George - maybe the tech notes on the site could be updated to mention 
sqlite3 ?

And a final note - sqlite is 'simple' in its way, but not very 
friendly to people using basic or other friendly development 
languages - officially it is a C library. If you're talking to sqlite 
using anything other than C, (or maybe C++) then you're using a 
wrapper, and they don't support wrappers directly at sqlite.org, 
although they do have a helpful list of them buried inside their 
CVSTrac 

Here's a starting point for the newobjects wrapper that NSBasic uses: 
http://www.newobjects.com/pages/ndl/SQLite3/SQLiteCOM.htm

--- In nsbasic...@yahoogroups.com, jpcb...@... wrote:

 Thank you for your help !  I am using NsBasic/CE version 6.0.3 and 
 my command to use the SQlite database is 
AddObject NewObjects.sqlite.dbutf8,  db.
  
 If I need version 3.3.5, how, what and where do I get it.  I've 
 been  all over the Sqlite.org site and I can't figure how to get 
 version 3.3.5.
  
 I like the simplicity of NsBasic and the same idea with SQlite; 
 but, its this scavenger hunt process of figuring how to get 
 things working that is really disconcertng.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re:Source code

2008-11-13 Thread Chris Kenworthy
Around Activesync 4.2 and earlier, it would automatically convert CDB 
files into MDB files when copying them from the mobile device. If 
practical, this might be the easiest way to do what you need. 
Activesync 4.2 can still be downloaded here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=7269173a-28bf-
4cac-a682-58d3233efb4cdisplaylang=en

There are a few utilities around that are meant to access or convert 
CDB files on windows machines, but I've never had much luck with them. 
When activesync dropped its own converter function, I've started making 
the switch from ADOCE-CDB over to sqlite.

Good luck with your project.

--- In [EMAIL PROTECTED],  Brooks Rimes [EMAIL PROTECTED] wrote:

 The key at this point is not the NS Basic program.
 
 What I need to do is read the CDB files from MS Access, particularly 
the
 image data from the picturebox and print it from Access.
 
 I tried using some unsupported code from a package called VBRAPI but 
it
 seemed to work with the MSys... files not the CDBs.
 
 Is there a relationship between CDB files and MSys... files?
 
 Brooks




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: Installing IPWorks on desktop/CE?

2008-10-08 Thread Chris Kenworthy
Alright, I actually emailed someone at /n software support about 
this, and got a fairly prompt and helpful reply, which I'll quote in 
part for the benefit of the group:

 To register ActiveX libraries from this toolkit onto the device, 
 you'll need to use the Control Manager application provided with 
 Embedded Visual Basic.

 Please open the control manager (under the tools menu), and add the 
 control to the device you are working with.  You also need to add 
 the desktop version of the control under Desktop Controls in the 
 Control Manager. You may be able to use a similar Control Manager 
 in NSBasic, but you will need to consult NSBasic support about what 
 tools are available.

 Alternatively, you can use the OK property of the object to license 
 the objects at runtime. On your development machine, make a button 
 or something that will print the value of the 'ok' property. 
 The 'ok' property will be
 like any other property that you would print.
 Now, run your program to find the value of the 'ok' property, it 
 will be a long string of characters.

 At runtime on the device, before you use any of the controls, set 
 the 'ok' property of each control you use to that string.  ex:

http1.ok = 'ASDFASDFASDGFAGASDFASDFA'

 This should fix your problem.  Hope this helps!


So, it sounds like my notion about using a property was on target, 
and that the 'ok' property isn't listed in the regular documentation. 
(D'oh!)

--- In [EMAIL PROTECTED], ghidera2000 [EMAIL PROTECTED] 
wrote:

 On a whim I brought up VB6 and added some IP#Works controls. They 
 seem to work just fine. That got me thinking that maybe I 
downloaded 
 the wrong package so I went back and made sure I grabbed the 2002 
 activeX for pocktetpc. I uninstalled what I had and re-installed 
the 
 new download but there's no change so I'm pretty sure I have the 
 right package.
 
 I do have an email with what looks like registry entries in it but 
 it just says to use it if I have to re-install at a later date. 
I'll 
 have to have another look at that tonight.
 
 I've never seen anything that talks about using a key like you do 
 with Franson serial and Visual Basic doesn't seem to require it to 
 add the controls and see the properties (haven't actually run 
 anything with VB though).
 
 I think it would be good if George updated the NSBasic site with 
 some instructions. For that matter, get some links from the regular 
 pages to the IP*Works pages as nsbasic.com. I had to use google to 
 find the IP*Works announcement/instructions  at the nsbasic site.
 
 
 --- In [EMAIL PROTECTED], Chris Kenworthy 
 Chris_Kenworthy@ wrote:
 
  I thought I saw something about this a while ago, either on the 
 group 
  or the NSBasic site, but now I can't find it, and I'm wondering 
if 
 I 
  was imagining it... something along the lines of 'you need to 
 create a 
  project on your desktop that uses IP*Works, and access such-and-
 such 
  property to find your licence key, and then you can write that 
 licence 
  key into your NSBasic CE projects manually, assigning it to the 
 same 
  property. But now I can't even see a likely-looking property to 
 work 
  with.
  
  Does what I'm talking about sound familiar to anyone else?
  
  --- In [EMAIL PROTECTED], ghidera2000 ghidera2000@ 
  wrote:
  
   I installed IPWorks on my desktop computer, created a simple 
 program 
  in 
   NSBasic CE and uploaded it to my CE machine. Although I 
included 
 the 
   activeX controls the CE program complains that they don't 
exist. 
 I 
   tried copying the ocx file to the CE machine and registering it 
 with 
   regsvrce which made the program stop complaining but now its 
got 
 a 30 
   day trial popup (which I'm assuming its not supposed to do).
   
   Is there something I need to do in NSBasicCE other than adding 
 the 
   activex controls to the toolbar? When I drag them onto a form 
 the 
   poperties page for the control is basically blank.
   
   Lost in a fog here. Anyone know how to use this?
  
 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: IPWorks HTTP runtime error?

2008-09-25 Thread Chris Kenworthy
Okay, I went in to insert the typename call, and then, with fresh 
eyes, I saw what the REAL mistake was. Had nothing to do with 'd'

Sub web_endtransfer(d)
   If d = 1 Then
  txtMsg = headers  body
   End If   

End Sub

txtMsg is a textbox object. I was using vb6 shortcuts, and changing 
the line to:

  txtMsg.Text = headers  body

makes it run much happier! Thanks for the attempt to sort out my 
mistakes.

--- In [EMAIL PROTECTED], George Henne [EMAIL PROTECTED] wrote:

 The TypeName() function can be useful to see the type of the 
variable
 being returned. Can you use it to confirm that d is what you think 
it is?
 
 Hey, hoping that somebody might be able to help me. I'm giving 
 IPworks a try, and started with converting a simple HTTP program I 
 already had working with newobjects.
 
 If the internet is available, I get to the following message:
 Scripting Error [ok]
 Microsoft VBScript runtime
 error - line 31, char 6
 Object doesn't support
 this property or method
 
 Line 31 appears to be if d = 1 then, which doesn't seem to have 
an 
 object, unless the d variable (passed by the web_endtransfer 
event) 
 is a complex object and not an integer. However, I've commented 
out 
 that line and the 'end if' and still gotten the same message, so 
line 
 numbers are probably off.
 
 Full code follows. Any ideas?
 
 ==
 
 Option Explicit
 ShowOKButton True 'for CE
 
 Dim ConnectCount
 AddObject IPWorks.HTTP, web
 
 Dim headers, body
 
 Sub cmdFetch_Click
  web.get http://vb.training.dependableit.com/log.txt;
  headers = 
  body = 
 End Sub
 
 Sub web_header (f, v)
If f =  Then
   headers = headers  \--   v  vbCrLf
Else
   headers = headers  f  :   v  vbCrLf
End If

 End Sub
 
 Sub web_transfer (d, bt, t)
If d = 1 Then
   body = body  t
End If
 End Sub
 
 Sub web_endtransfer(d)
If d = 1 Then
   txtMsg = headers  body
End If


 End Sub
 
 
 
 
 
 
 
 Yahoo! Groups Links
 
 
 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---