Announcement

Collapse
No announcement yet.

Cash Register Display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cash Register Display

    Hello All,

    Sorry, I do not post often however I thoroughly respect and appreciate all of the hard work, comments and examples in these forums.

    I produce very complex code for the security industry and the Unmanned Aerial Systems (UAS) arena.

    My base OS was coded in PB DOS (1993~) and sets up a robust multi-tasking OS Tactical Operating System (TOS) that provides both in Vehicle and Ground Command and Control of a UAS in very high speed (thanks PB) real time.

    Fast forward, almost everything I do is in PB CC with NO user interface, all commands are received via an RS-232 interface.

    This interface has been from a feed from a FoxPro application that sends my system commands that are far too slow to land a plane let alone targeting commands.

    A commander has requested that I produce a Touch Screen (resistive) interface that provides: 1 inch square (Minimum) buttons, on a screen with NO Windows Task Bar (Available via special key sequence) that can provide a dynamically controlled interface depending on the input, while wearing battle gloves.

    The typical restaurant order screen is exactly what he wants.

    Finally, the question:

    Can I do this in PB CC using graphics or do I do it in PB Win.

    PB CC is my choice.

    Thanks All,
    Mike Comeau

    You can see our product at: www.blackfly.us/autoswarmvideo.wmv
    The file is a 80MB wmv file.

    Thanks.

  • #2
    If the touch screen driver works like a mouse then YES, a PB graphics window can be used to paint the interface and then detect the "clicks" (tabs) as usual.
    Another way would be via an SDK window (CreateWindowEx) and detect the clicks through that.
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Kev, The touch screen drivers do emulate the mouse exactly after calibrating.

      Thanks,
      Mike

      Comment


      • #4
        Originally posted by Mike Comeau View Post
        Kev, The touch screen drivers do emulate the mouse exactly after calibrating.
        They should be very accurate and emulate "single-click" mouse events. Make sure that when you are calibrating that you are standing at the same angle, and if using gloves, calibrate with the gloves. Sometimes the calibration needs to be redone in certain instances.
        Scott Slater
        Summit Computer Networks, Inc.
        www.summitcn.com

        Comment


        • #5
          Originally posted by Mike Comeau View Post
          ...on a screen with NO Windows Task Bar.
          You can set your window property to have the "TOPMOST" property in order to cover up the task bar. Setting it back will allow the task bar to be shown.

          Code:
          ' Set To Topmost
          SetWindowPos hWin, %HWND_TOPMOST, 0, 0, 0, 0, %SWP_NOSIZE Or %SWP_NOMOVE
           
          ' Remove Topmost
          SetWindowPos hWin, %HWND_NOTOPMOST, 0, 0, 0, 0, %SWP_NOSIZE Or %SWP_NOMOVE
          Scott Slater
          Summit Computer Networks, Inc.
          www.summitcn.com

          Comment


          • #6
            Great, thanks Scott.

            Comment


            • #7
              Originally posted by Mike Comeau View Post
              You can see our product at: www.blackfly.us/autoswarmvideo.wmv
              Impressive system, Mike.... :applaus:
              The video too, BTW.

              Kind regards
              Eddy

              Comment


              • #8
                Mike:

                You can write a complete PBCC application in a Graphic Window, and the resulting exe will be very tigth and very fast. The code below mimics a numeric pad and may be can suggest some ideas.

                Regards,

                Code:
                 
                #COMPILE EXE
                #CONSOLE OFF
                #DIM ALL
                GLOBAL Caption$,CH$,OPS$()
                GLOBAL hwin,hvin,fnt1,PixW,PixH AS LONG
                GLOBAL NO!,XS!,YS!,G%,ATE!,ATP!,ATH!,FH!,FV!,clk&,xm!,ym!,H%
                FUNCTION PBMAIN () AS LONG
                 LOCAL x1!,y1!,x2!,y2!
                 DIM OPS$(60)
                 DESKTOP GET CLIENT TO PixW,PixH
                 x1=0
                 y1=0
                 x2=PixW
                 y2=PixH
                 Caption$=""
                 GRAPHIC WINDOW Caption$,x1,y1,x2,y2 TO hwin
                 GRAPHIC ATTACH hwin,0,REDRAW
                 GRAPHIC CLEAR RGB(212,208,200),0
                 IF PixW<900 OR PixH<750 THEN
                  FONT NEW "Courier New",18,1,0,0,0 TO fnt1
                 ELSE
                  FONT NEW "Courier New",28,1,0,0,0 TO fnt1
                 END IF
                 GRAPHIC SET FONT fnt1
                 NO!=10
                 XS!=65
                 FH!=PixW/1280
                 FV!=PixH/1024
                 ATE!=115*FH!
                 ATP!=120*FH!
                 ATH!=115*FV!
                 GRAPHIC WIDTH 2
                 GRAPHIC LINE(64*FH!,124*FV! )-(1218*FH!,124*FV!),%GRAY
                 GRAPHIC LINE(65*FH!,836*FV! )-(1218*FH!,836*FV!),%WHITE
                 GRAPHIC LINE(65*FH!,125*FV! )-(65*FH!,836*FV! ),%GRAY
                 GRAPHIC LINE(1218*FH!,126*FV! )-(1218*FH!,836*FV!),%WHITE
                 FOR H%=1 TO 6
                  FOR G%=1 TO NO!
                   CALL DITEC(G%,H%)
                  NEXT
                 NEXT
                 GRAPHIC REDRAW
                 GRAPHIC GET DC TO hvin
                 DO
                  IF hvin=0 THEN EXIT LOOP
                  DO UNTIL CH$="" AND clk&=0
                   GRAPHIC WINDOW CLICK TO clk&,xm!,ym!
                   GRAPHIC INKEY$ TO CH$
                  LOOP
                  DO
                   SLEEP(10)
                   GRAPHIC GET DC TO hvin
                   IF hvin=0 THEN EXIT LOOP
                   GRAPHIC WINDOW CLICK TO clk&,xm!,ym!
                   GRAPHIC INKEY$ TO CH$
                   IF CH$<>"" THEN
                    EXIT LOOP
                   ELSEIF clk& THEN
                    CH$=CHR$(255)
                    IF (ym!>128*FV!  AND ym!<835*FV! ) AND (xm!>XS!*FH! AND xm!<(XS!+10*115)*FH!)THEN
                     G%=1+(xm!-XS!*FH!)\ATE!
                     H%=INT((ym!-(128*PixH/1024))\(118*PixH/1024))
                     YS!=(10+118*(1+INT((ym!-(128*PixH/1024))\118*PixH/1024)))*FV!
                     GRAPHIC WIDTH 2
                     GRAPHIC LINE(67*FH!+ATE!*(G%-1),YS!)-(60*FH!+ATP!+ATE!*(G%-1),YS!),%GRAY
                     GRAPHIC LINE(68*FH!+ATE!*(G%-1),YS!-1)-(68*FH!+ATE!*(G%-1),YS!+ATH!),%GRAY
                     GRAPHIC LINE(60*FH!+ATP!+ATE!*(G%-1),YS!+1)-(60*FH!+ATP!+ATE!*(G%-1),YS!+ATH!),%WHITE
                     GRAPHIC LINE(68*FH!+ATE!*(G%-1),YS!+ATH!)-(60*FH!+ATP!+ATE!*(G%-1),YS!+ATH!),%WHITE
                     GRAPHIC WIDTH 1
                     GRAPHIC LINE(68*FH!+ATE!*(G%-1),YS!)-(60*FH!+ATP!+ATE!*(G%-1),YS!),RGB(115,115,115)
                     GRAPHIC LINE(68*FH!+ATE!*(G%-1),YS!)-(68*FH!+ATE!*(G%-1),YS!+ATH!),RGB(115,115,115)
                     GRAPHIC SET POS(600*FH!,40*FV!)
                     GRAPHIC PRINT G%+10*H%
                     GRAPHIC REDRAW
                     SELECT CASE G%
                      CASE 1
                      CASE 2
                      CASE 3
                      CASE 4
                      CASE 5
                      CASE 6
                      '.
                      '.
                      '.
                      CASE 57
                      CASE 58
                      CASE 59
                      CASE 60
                     END SELECT
                     SLEEP 200
                     CALL DITEC(G%,H%+1)
                     GRAPHIC REDRAW
                     EXIT LOOP
                    END IF
                   END IF
                  LOOP
                  IF CH$=CHR$(27) THEN EXIT LOOP
                 LOOP
                 GRAPHIC WINDOW END
                END FUNCTION
                SUB DITEC(X%,Y%)
                 YS!=(10+118*Y%)*FV!
                 GRAPHIC WIDTH 2
                 GRAPHIC LINE(67*FH!+ATE!*(X%-1),YS!)-(60*FH!+ATP!+ATE!*(X%-1),YS!),RGB(255,255,255)
                 GRAPHIC LINE(68*FH!+ATE!*(X%-1),YS!-1)-(68*FH!+ATE!*(X%-1),YS!+ATH!),RGB(255,255,255)
                 GRAPHIC LINE(60*FH!+ATP!+ATE!*(X%-1),YS!+1)-(60*FH!+ATP!+ATE!*(X%-1),YS!+ATH!),%GRAY
                 GRAPHIC LINE(68*FH!+ATE!*(X%-1),YS!+ATH!)-(60*FH!+ATP!+ATE!*(X%-1),YS!+ATH!),%GRAY
                 GRAPHIC WIDTH 1
                 GRAPHIC LINE(60*FH!+ATP!+ATE!*(X%-1),YS!)-(60*FH!+ATP!+ATE!*(X%-1),YS!+ATH!),RGB(115,115,115)
                 GRAPHIC LINE(68*FH!+ATE!*(X%-1),YS!+ATH!)-(60*FH!+ATP!+ATE!*(X%-1),YS!+ATH!),RGB(115,115,115)
                 GRAPHIC SET POS((XS!+15)*PixW/1280+ATE!*(X%-1),YS!+35*PixH/1024)
                 GRAPHIC COLOR %RED,RGB(212,208,200)
                 GRAPHIC PRINT G%+10*(Y%-1)
                END SUB
                Last edited by Manuel Valdes; 29 Sep 2009, 11:17 PM.

                Comment


                • #9
                  Thank you all very much especially the code snips, this will jog the old brain, I will post the display interface code when complete. Eack touch screen displayed will be dynamically driven by an array of attributes, as well as populated with real time data depending on the status of the conditions requested, probably 30 or so screens.
                  Mike Comeau

                  Comment


                  • #10
                    Manuel,

                    I don't have PBCC, only PBWin. Is it possible to post a compiled exe of the posted source code so I can see how your program looks?

                    Kind regards
                    Eddy

                    Comment


                    • #11
                      Eddy,

                      It's PB/WIN compatible, just remove the #CONSOLE statement and it will compile and run fine in PB/WIN.
                      kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                      Comment


                      • #12
                        Originally posted by Kev Peel View Post
                        It's PB/WIN compatible,
                        Indeed it is, Kev. Thanks for mentioning that to me !!

                        Kind regards
                        Eddy

                        Comment


                        • #13
                          Change:
                          Code:
                          DESKTOP GET CLIENT TO PixW,PixH
                          to 
                          DESKTOP GET SIZE TO PixW,PixH
                          on Manuel's code to hide Taskbar.

                          BTW works very well, very responsive on my Touch Screen tablet PC (Vista 64)

                          Rod

                          Comment


                          • #14
                            I forgot mentioning that the code could be compiled in PBWin 9, but not the same in PBWin 8, since it include some of the new features introduced with the last version. So, just in case somebody is interested, I am attaching the exe.

                            Best regards,
                            Attached Files

                            Comment


                            • #15
                              Thanks Manuel!!

                              Kind regards
                              Eddy

                              Comment

                              Working...
                              X