FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FYI Tablet App
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
FYI Tablet App
Posted: Tue May 12, 2015 03: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

Main menu

Signature Capture

Interchange Printed on Portable Wireless Bluetooth Printer
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: FYI Tablet App
Posted: Tue May 12, 2015 04: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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: FYI Tablet App
Posted: Tue May 12, 2015 04: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

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: FYI Tablet App
Posted: Tue May 12, 2015 04: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
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: FYI Tablet App
Posted: Tue May 12, 2015 06: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.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: FYI Tablet App
Posted: Tue May 12, 2015 07:40 PM

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FYI Tablet App
Posted: Wed May 13, 2015 06:10 AM

Very nice, congratulations! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FYI Tablet App
Posted: Wed May 13, 2015 08: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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FYI Tablet App
Posted: Wed May 13, 2015 08: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


Posts: 145
Joined: Wed Nov 03, 2010 09:16 AM
Re: FYI Tablet App
Posted: Wed May 13, 2015 09:49 AM

Hi Gale
Nice job!!! Congratulations.

;)

Paco García
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: FYI Tablet App
Posted: Wed May 13, 2015 03: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 (fw): Select all Collapse
#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 (fw): Select all Collapse
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
}
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FYI Tablet App
Posted: Wed May 13, 2015 05: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

Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: FYI Tablet App
Posted: Thu May 14, 2015 06:14 PM

Gale:

Very nice!

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

Thanks,
Randal

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: FYI Tablet App
Posted: Mon May 25, 2015 07:00 AM

Gale:

Great job ! Kudos !!!

Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: FYI Tablet App
Posted: Fri Apr 17, 2020 05:05 PM

Muchas gracias, Gale :D

Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]

Continue the discussion