FYI Tablet App

FYI Tablet App

Postby Gale FORd » Tue May 12, 2015 3:59 pm

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
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: FYI Tablet App

Postby Armando » Tue May 12, 2015 4:05 pm

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
Armando
 
Posts: 3078
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: FYI Tablet App

Postby Rick Lipkin » Tue May 12, 2015 4:41 pm

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
Rick Lipkin
 
Posts: 2633
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: FYI Tablet App

Postby cnavarro » Tue May 12, 2015 4:55 pm

congratulations
great work
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FYI Tablet App

Postby Gale FORd » Tue May 12, 2015 6:54 pm

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.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: FYI Tablet App

Postby James Bott » Tue May 12, 2015 7:40 pm

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: FYI Tablet App

Postby Antonio Linares » Wed May 13, 2015 6:10 am

Very nice, congratulations! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41373
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FYI Tablet App

Postby Otto » Wed May 13, 2015 8:00 am

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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6058
Joined: Fri Oct 07, 2005 7:07 pm

Re: FYI Tablet App

Postby Otto » Wed May 13, 2015 8:00 am

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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6058
Joined: Fri Oct 07, 2005 7:07 pm

Re: FYI Tablet App

Postby pgfdz » Wed May 13, 2015 9:49 am

Hi Gale
Nice job!!! Congratulations.

;)
Paco García
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: FYI Tablet App

Postby Gale FORd » Wed May 13, 2015 3:32 pm

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  Expand view
#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  Expand view
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
}
 
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: FYI Tablet App

Postby Otto » Wed May 13, 2015 5:27 pm

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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6058
Joined: Fri Oct 07, 2005 7:07 pm

Re: FYI Tablet App

Postby Randal » Thu May 14, 2015 6:14 pm

Gale:

Very nice!

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

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: FYI Tablet App

Postby HunterEC » Mon May 25, 2015 7:00 am

Gale:

Great job ! Kudos !!!
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: FYI Tablet App

Postby leandro » Fri Apr 17, 2020 5:05 pm

Muchas gracias, Gale :D
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1485
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 38 guests