FYI Tablet App

Post Reply
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

FYI Tablet App

Post by Gale FORd »

I am getting close to completing my first tablet application. I just thought I would share a couple of pictures.
This app is designed for a Container Yard Interchange Clerks. Every container and chassis that comes into and out of the container yard has to be inspected and a signed interchange given to the drivers. Our Houston location has 4 inbound lanes and 2 outbound lanes. There are usually 3 or 4 clerks at a time doing the inspections.

Our Houston inbound gate
Image
Main menu
Image
Signature Capture
Image
Interchange Printed on Portable Wireless Bluetooth Printer
Image
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: FYI Tablet App

Post by Armando »

Gale:

WOW!!!!!!, nice job, congratulations.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: FYI Tablet App

Post by Rick Lipkin »

Gale

Really Kewl .. it looks like this tablet is running a Windows 8.1 OS ? and your app looks like a Win32 Gui ? Can you share any details on how you wrote this for a tablet interface ?

Thanks
Rick Lipkin
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FYI Tablet App

Post by cnavarro »

congratulations
great work
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: FYI Tablet App

Post by Gale FORd »

Yes, it is running Windows 8.1 Pro. We have a strong WiFi device for network connectivity. Advantage Database Server for our data storage.
I looked at all of the samples related to Metro and Touch to get ideas.
Still have some problems with automatic keyboard display so we decided to keep keyboard on screen all of the time. If it closes I will open it again when changing screens and there is a keyboard button on screen just in case.

Using resource for dialog screens. Had to adjust font size for visibility and touch friendliness. Locked screen orientation so the dialog layout would remain correct.
Instead of spending $2,500 or more for rugged tablet, we bought inexpensive tablet and added tough case for total under $600. We can buy 4 cheaper ones for the price of 1 rugged tablet.
3" wide wireless thermal printer has printer driver so there was no problem there. Had to calculate # lines to print and adjust page size.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: FYI Tablet App

Post by James Bott »

Very impressive Gale. You are now the go-to guy for tablet questions!

James
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FYI Tablet App

Post by Antonio Linares »

Very nice, congratulations! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: FYI Tablet App

Post by Otto »

Hello Gale,

Thank you for posting these screens.
Respect and congratulations.

May I ask if you are using the CaptureSignature() function from the FiveWin samples.

I started using this functions some days ago but my signature does not paint as nice as yours.
I am testing now with inserting some sysrefresh().
And I planed to use a timer to get more painting coordinates.

I am curious if you have a dll or if you use CaptureSignature()

Thanks in advance
Otto


http://www.atzwanger-software.com/fw/unterschrift2.jpg
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: FYI Tablet App

Post by Otto »

Hello Gale,

Thank you for posting these screens.
Respect and congratulations.

May I ask if you are using the CaptureSignature() function from the FiveWin samples.

I started using this functions some days ago but my signature does not paint as nice as yours.
I am testing now with inserting some sysrefresh().
And I planed to use a timer to get more painting coordinates.

I am curious if you have a dll or if you use CaptureSignature()

Thanks in advance
Otto


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
pgfdz
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: FYI Tablet App

Post by pgfdz »

Hi Gale
Nice job!!! Congratulations.

;)
Paco García
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: FYI Tablet App

Post by Gale FORd »

I used signatur.prg as example. I made some enhancements and fixes to it.
I agree that the quality is not 100% what I would like. It seems the captured mouse movement is not always pixel by pixel.

This is an updated sample from my code, but I have not tested it.

Code: Select all

#include "FiveWin.ch"

function CaptureSignature()

   local oDlg, oSig, lPaint := .F., cFile := Lower( "signature.bmp" ), hDC
   local lReset := .f.
   local oBrush
   local nPenWidth := 4, oPenSig
   local nTop := 2, nBottom := 0
   local aCoord
   local nColor := CLR_WHITE

   oBrush := TBrush():New( , nColor )
   DEFINE DIALOG oDlg TITLE "Signature" PIXEL ;
      RESOURCE "DLG_Sign"

   DEFINE PEN oPenSig  WIDTH nPenWidth COLOR CLR_BLACK

   REDEFINE SAY oSig ID 200 PROMPT "" OF oDlg
   oSig:nClrPane := nRgb( 255,255,255 )
   oSig:oBrush  := oBrush

   redefine button prompt 'Save';
      id 100 of oDlg update;
      ACTION ( oSig:SaveToBmp( cFile ), oDlg:End() )

   redefine button prompt 'Cancel';
      id 101 of oDlg ;
      action ( lReturn := .f., oDlg:End() )

   redefine button prompt 'Clear';
      id 102 of oDlg ;
      action ( lPaint := .F., ;
         FillRect( hDC, GetClientRect( oSig:hWnd ), oBrush:hBrush ), ;
         oSig:refresh(.t.) )

   oSig:lWantClick := .T.
   // Fixed row, col to y, x conversion, x/y designation was reversed
   oSig:bLButtonUp := { | y, x, z | DoDraw( hDC, x, y, lPaint := .F.,, oPenSig ) }
   // Added limits to Top and Bottom in case users draw off canvas
   oSig:bMMoved    := { | y, x, z | ( ;
      if( y >= nBottom .or. y <= nTop , lReset := .T., lReset := .f. ), ;
      DoDraw( hDC, x, y , lPaint, lReset, oPenSig )) }
   oSig:bLClicked  := { | y, x, z | DoDraw( hDC, x, y, lPaint := .T., .t., oPenSig  ) }
   // If button released when not on Signature area
   oDlg:bLButtonUp := { || lPaint := .F. }

   ACTIVATE DIALOG oDlg CENTER ;
      ON INIT ( aCoord := GetCoors( oSig:hWnd ), ;
         nBottom := aCoord[3]- aCoord[1]-2, ;
         hDC := GetDC( oSig:hWnd ), oSig:nClrPane := nColor ) ;
      VALID ( ReleaseDC( oSig:hWnd, hDC ), .T. )
   RELEASE PEN oPenSig

return nil

static function DoDraw( hDc, x, y, lPaint, lReset, oPen )
   if ! lPaint .or. ( lReset != nil .and. lReset )
      MoveTo( hDC, x, y )
   else
      LineTo( hDc, x, y, oPen:hPen )
   endIf
return nil
Here is the .rc

Code: Select all

DLG_Sign DIALOG -32768, 65, 204, 99
STYLE DS_SYSMODAL | DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Signature"
FONT 12, "MS Sans Serif"
{
 PUSHBUTTON "Save", 100, 6, 3, 46, 14
 PUSHBUTTON "Cancel", 101, 84, 3, 35, 14
 PUSHBUTTON "Clear", 102, 162, 3, 35, 14
 GROUPBOX "", 104, 4, 17, 198, 68, BS_GROUPBOX
 CONTROL "", 200, "STATIC", SS_WHITERECT | WS_CHILD | WS_VISIBLE, 5, 22, 196, 61
 RTEXT "X", -1, 1, 78, 5, 9
 CTEXT "I agree that this inspection is correct.", -1, 13, 88, 172, 9
}
 
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: FYI Tablet App

Post by Otto »

Hello Gale,
thank you.
I will study your changes. What I did is to put a sysrefresh()
inside the function.
It seems to me that I get slightly better results.
But I think a timer would be best.
Firing oDlg:bLButtonUp and oDlg:bLClicked .
Best regards,
Otto

static function DoDraw( hDc, x, y, lPaint, lReset, oPen )
if ! lPaint .or. ( lReset != nil .and. lReset )
MoveTo( hDC, x, y )
else
LineTo( hDc, x, y, oPen:hPen )
endIf

sysrefresh()

return nil
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Randal
Posts: 250
Joined: Mon Oct 24, 2005 8:04 pm

Re: FYI Tablet App

Post by Randal »

Gale:

Very nice!

What make/model of tablet are you using and how do you like them?

Thanks,
Randal
HunterEC
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: FYI Tablet App

Post by HunterEC »

Gale:

Great job ! Kudos !!!
User avatar
leandro
Posts: 958
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Contact:

Re: FYI Tablet App

Post by leandro »

Muchas gracias, Gale :D
Saludos
LEANDRO ALFONSO
SISTEMAS LYMA - BASE
Bogotá (Colombia)
[ FWH 19.09 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613) ] [ Embarcadero C++ 7.30 for Win32 ]
Post Reply