Announcement

Collapse
No announcement yet.

Page to graphic font size ??

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

  • #21
    Running TextView.bas has problems, got error which I do not understand. I ran the TextView.exe that was already compiled in the foler and that worked.

    First error I got was , #COMPILER PBWIN 9 , wrong compiler for this program, so put 10.

    Next error
    LOCAL x, y, DW, dh, w, h, doFlag AS LONG , error with 'DW' says variable expected.

    ShowPreviewStart:
    DIALOG GET CLIENT hClient TO DW, dh ' client size

    did search for DW and found it is use in line above. Do not know what that error is about?

    above is code for Preview.inc , that where I got the error on DW .
    Robert

    Comment


    • #22
      Originally posted by Robert Alvarez View Post
      Running TextView.bas has problems, got error which I do not understand. I ran the TextView.exe that was already compiled in the foler and that worked.

      First error I got was , #COMPILER PBWIN 9 , wrong compiler for this program, so put 10.

      Next error
      LOCAL x, y, DW, dh, w, h, doFlag AS LONG , error with 'DW' says variable expected.

      ShowPreviewStart:
      DIALOG GET CLIENT hClient TO DW, dh ' client size

      did search for DW and found it is use in line above. Do not know what that error is about?

      above is code for Preview.inc , that where I got the error on DW .
      I just checked and ASMDATA is a new statement and it lists DB, DD, DQ and DW as statements. Looks like it's a new for v10 reserved word.

      I just did a test with DQ and it gives the same result in a random program that I'm working on.
      www.thecomputerarchive.com Preserving the history of companies that advanced the computer revolution

      Comment


      • #23
        Yes, like Dan points out - DW is a new reserved word.
        1. Rem out #COMPILER PBWIN 9 (or change to #COMPILER PBWIN 10)
        2: In PreView.inc - Rename 4 instances of dw to for example dgw. (Replace All - Whole Words Only)
        3. In TextView.Bas - FUNCTION PageSetupDlgProc, rename PAGESETUPDLGA to PAGESETUPDLGA_type
        4. In PreView.inc - TYPE PreviewData, change pw and ph from SINGLE to LONG.
        5. Compile.

        Comment


        • #24
          If you have PBWin1004 you will also want to use the bug fix following DIALOG PIXELS and DIALOG UNITS statements
          Code:
            DIALOG UNITS hDlg, 44, 12 TO PIXELS w, h  ' Button size
             #If %PB_Revision = &H1004
               Swap w,h                                ' Bug Fix PBWin1004
             #EndIf
          Rgds, Dave

          Comment


          • #25
            Borje , got those changes made.
            Problem the main dialog text box is 2/3 the size horizontally , move dialog size down and text box stretches horiz. In the pre-complied EXE did not do that, textbox was full width as dialog width and stretched correct in vert and horz when resized. Also the Preview.inc shows the top buttons flipped, narrow horz and long vert.

            put DAVE suggestion "swap" that fixed part 2 of problem

            also noted that when opening files *.txt does not automatically work , have to type it in "*.txt" and it is in the list of files to view
            Robert

            Comment


            • #26
              Bug fix also required in two other places..

              In TextView.bas
              Code:
                         DIALOG PIXELS CB.HNDL, w, h TO UNITS w, h  ' convert to dialog units
                           #If %PB_Revision = &H1004
                             Swap w,h                             ' PBWin1004
                           #EndIf
              Also in Preview.inc
              Code:
                DIALOG UNITS hDlg, 2,   2 TO PIXELS x, y  ' Space between..
                 #If %PB_Revision = &H1004
                   Swap x,y                                ' Bug Fix PBWin1004
                 #EndIf
              Rgds, Dave

              Comment


              • #27
                Got the bugs, thanks Borje and Dave and everyone for you help and comments. now to find my solution to my problem with all this info, may go with BITMAPs since this can also handle bitmap images and not just text. When I have the problem solved will post the final print preview with zoom.
                Robert

                Comment


                • #28
                  This statement appends '.TXT' to any file name entered. A person does not have to type the '.txt'. However, it does not show in the OPENFILE dialog.
                  Code:
                            DISPLAY OPENFILE, p.x, p.y, "Text Save", "", CHR$("TEXT", 0, "*.TXT", 0),"","*.TXT",%OFN_SHOWHELP TO txtfile
                  Rod
                  "To every unsung hero in the universe
                  To those who roam the skies and those who roam the earth
                  To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

                  Comment


                  • #29
                    Or, avoid the SWAP by swapping the return variables.
                    Code:
                    #IF %PB_REVISION = &h1004
                      DIALOG UNITS hDlg, 44, 12 TO PIXELS h, w  ' Bug Fix PBWin1004
                    #ELSE
                      DIALOG UNITS hDlg, 44, 12 TO PIXELS w, h 'normal, other versions
                    #ENDIF
                    (return values are by position, not the name of the variable at the position )

                    Cheers,

                    ((just a minor improvement! thanks Dave))
                    Dale

                    Comment


                    • #30
                      Ok graphics, here is where I need help. Below is a small sample code . Do not understand how GRAPHIC BITMAP NEW works. Trying to draw text and some lines to a bitmap and then
                      put that image in a graphic box , to be enlarged or scaled down. Did search for samples but they had more than I needed and were complex.

                      Just do not see where my code is missing something??

                      Code:
                      #COMPILE EXE
                      #DIM ALL
                      
                      GLOBAL hDlg AS DWORD
                      
                      FUNCTION PBMAIN () AS LONG
                         LOCAL I, BM1 AS LONG, T1, T2 AS STRING
                         DIALOG NEW PIXELS, 0, "TEST XPRINT RENDER N COPY", , , 1000, 600, %WS_THICKFRAME OR %WS_CAPTION OR %WS_SYSMENU _
                                           OR %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX, TO hDlg
                      
                         CONTROL ADD GRAPHIC, hDlg, 100, "xx", 50, 50,300,200 ,%SS_SUNKEN   'GRAPHIC JUST TO VIEW TEXT AND BOXES
                         CONTROL ADD GRAPHIC, hDlg, 200, "xx",360,50,600,400 ,%SS_SUNKEN    'GRAPHIC TO PUT BITMAP IMAGE ENLARGED
                      
                         CONTROL ADD BUTTON , hDlg, 101 ,"&ZOOM"  ,160, 560, 60, 25, 'CALL ZOOM
                      
                         '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                         GRAPHIC ATTACH hDlg, 100
                         GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                         GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                         T2="123456789012345678901234567890"
                         FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4):  GRAPHIC PRINT  T1+T2 :  NEXT
                         '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                      
                      
                         '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                         GRAPHIC BITMAP NEW 300, 150 TO BM1
                         GRAPHIC ATTACH hDlg, BM1
                         GRAPHIC ATTACH hDlg, 300
                         GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                         GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                         T2="123456789012345678901234567890"
                         FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4):  GRAPHIC PRINT  T1+T2 :  NEXT
                         '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                      
                         'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                         'GRAPHIC STRETCH BM1, 300, (0,0)-(100,150) TO (0,0)-(200,300)' [, Mix, Stretch]
                      
                      
                         'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                         GRAPHIC STRETCH PAGE BM1, 200 , 0
                      
                         DIALOG SHOW MODAL hDlg
                      END FUNCTION
                      
                      CALLBACK FUNCTION ZOOM()
                      '''
                      END FUNCTION
                      Robert

                      Comment


                      • #31
                        Robert, couple of points:

                        1. It's a good plan to use #DEBUG DISPLAY at the top of your code to catch errors which you might otherwise miss. And some labels to help localise the errors.

                        2. You need to have a loop in there to monitor the keyboard, for example, otherwise the logic just continues to the end and the application terminates. GRAPHIC INKEY$... is one way of doing this.

                        Here is a working version of your code:

                        Code:
                        #compile exe
                        #dim all
                        #debug display
                        global hDlg as dword
                        
                        function pbmain () as long
                           local I, BM1 as long, T1, T2 as string
                           local skey as string
                           dialog new pixels, 0, "TEST XPRINT RENDER N COPY", , , 1000, 600, %ws_thickframe or %ws_caption or %ws_sysmenu _
                                             or %ws_minimizebox or %ws_maximizebox, to hDlg
                        
                           control add graphic, hDlg, 100, "xx", 50, 50,300,200 ,%ss_sunken   'GRAPHIC JUST TO VIEW TEXT AND BOXES
                           control add graphic, hDlg, 200, "xx",360,50,600,400 ,%ss_sunken    'GRAPHIC TO PUT BITMAP IMAGE ENLARGED
                        
                           control add button , hDlg, 101 ,"&ZOOM"  ,160, 560, 60, 25, 'CALL ZOOM
                        
                        lab1:
                           '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                           graphic attach hDlg, 100
                           graphic box (10, 10) - (290, 190), 0, %blue
                           graphic box (50, 50) - (250, 150), 0, %blue
                           T2="123456789012345678901234567890"
                        lab2:
                           for I=1 to 5: T1=str$(I)+"   ": T1=mid$(T1,1,4):  graphic print  T1+T2 :  next
                           '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                        
                        
                           '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                           graphic bitmap new 300, 150 to BM1
                           graphic attach BM1, 0
                           'GRAPHIC ATTACH hDlg, 300
                           graphic box (10, 10) - (290, 140), 0, %blue
                           'GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                           T2="123456789012345678901234567890"
                        lab3:
                           for I=1 to 5: T1=str$(I)+"   ": T1=mid$(T1,1,4):  graphic print  T1+T2 :  next
                           '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                        
                           'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                           'GRAPHIC STRETCH BM1, 300, (0,0)-(100,150) TO (0,0)-(200,300)' [, Mix, Stretch]
                        
                        
                           'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                        lab4:
                           graphic stretch page BM1, 200 , 0
                           graphic inkey$ to skey
                           dialog show modal hDlg
                        end function

                        Comment


                        • #32
                          Hi Robert,

                          Try this mod..
                          Code:
                             '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                          
                          
                             '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                             GRAPHIC BITMAP NEW 300, 150 TO BM1
                           '   GRAPHIC ATTACH hDlg, BM1
                             GRAPHIC ATTACH BM1, 0   ' <<<
                             GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                             GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                             T2="123456789012345678901234567890"
                             FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4):  GRAPHIC PRINT  T1+T2 :  NEXT
                             '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                          
                             'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                             'GRAPHIC STRETCH BM1, 300, (0,0)-(100,150) TO (0,0)-(200,300)' [, Mix, Stretch]
                          
                          
                             'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                             Graphic Attach hDlg, 200     ' <<< direct work to Graphic control
                             GRAPHIC STRETCH PAGE BM1, 0   ' 200, 0    ' <<< source is Bitmap ie hBmp, 0  if source is control then use hDlg, ID
                          Rgds, Dave

                          Comment


                          • #33
                            Chris , run your sample. Did not work.
                            Dave , question on background colors.
                            When I drew lines and text to graphic 100 the back ground color was standard dialog color, when drawing to bitmap back ground color was black except for the text ?
                            Also noticed that the text was larger but the lines drawn were the same length in the stretched graphic ?
                            Updated code below:
                            Code:
                            #COMPILE EXE
                            #DIM ALL
                            
                            GLOBAL hDlg AS DWORD
                            
                            FUNCTION PBMAIN () AS LONG
                               LOCAL I, BM1, fhnd1 AS LONG, T1, T2 AS STRING
                            
                               DIALOG NEW PIXELS, 0, "TEST XPRINT RENDER N COPY", , , 1000, 700, %WS_THICKFRAME OR %WS_CAPTION OR %WS_SYSMENU _
                                                 OR %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX, TO hDlg
                            
                               FONT NEW "Times New Roman"   ,12,      0,       1,       0,       0         TO fhnd1
                            
                               CONTROL ADD GRAPHIC, hDlg, 100, "xx", 50, 50,300,200 ,%SS_SUNKEN    'GRAPHIC JUST TO VIEW TEXT AND BOXES
                               CONTROL ADD GRAPHIC, hDlg, 200, "xx",360, 50,700,400 ,%SS_SUNKEN    'GRAPHIC TO PUT BITMAP IMAGE ENLARGED
                            
                               CONTROL ADD BUTTON , hDlg, 101 ,"&ZOOM"  ,160, 560, 60, 25, 'CALL ZOOM
                            
                               '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                               GRAPHIC ATTACH hDlg, 100
                               GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                               GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                               T2="123456789012345678901234567890"
                               FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4):  GRAPHIC PRINT  T1+T2 :  NEXT
                               '***** THIS JUST TO SEE WHAT I PUT IN GRAPHIC BITMAP
                            
                            
                               '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                               GRAPHIC BITMAP NEW 600, 400 TO BM1
                               GRAPHIC ATTACH BM1, 0
                               GRAPHIC SET FONT fhnd1
                               GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                               GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                               T2="a123456789012345678901234567890"
                               FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4):  GRAPHIC PRINT  T1+T2 :  NEXT
                               '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                            
                               'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                               GRAPHIC ATTACH hDlg, 200
                               GRAPHIC STRETCH BM1, 300, (0,0)-(600,400) TO (0,0)-(600,400)' [, Mix, Stretch]
                            
                               'WANT IT TO GOTO GRAPHIC 200 , NOTHING DRAWN
                               'Graphic Attach hDlg, 200
                               'GRAPHIC STRETCH PAGE BM1, 200 , 0
                            
                               DIALOG SHOW MODAL hDlg
                            END FUNCTION
                            
                            CALLBACK FUNCTION ZOOM()
                            '''
                            END FUNCTION
                            Robert

                            Comment


                            • #34
                              Also notice that there is a line between each row of text add GRAPHIC COLOR -1 , %WHITE and still have line between text rows
                              How to remove that line ?
                              Robert

                              Comment


                              • #35
                                Windows sets the default background for the Graphic Control based upon the user selected Window Color and Appearance settings ( = GetSysColor(%COLOR_BTNFACE).
                                The memory bitmap doesn't have a default background so is shown black unless painted eg with a Graphic Clear statement.

                                The memory bitmap text shown in Graphic ID 200 is using fhnd1 - it you comment out the GRAPHIC SET FONT fhnd1 statement it looks the same as in Graphic ID 100

                                The black line shown between the rows of text in ID 200 seem to be a gap between the line spacing and the font size in Time New Roman.
                                It doesn't occur in other fonts eg Consolas.
                                Last edited by Dave Biggs; 15 May 2019, 10:50 AM. Reason: Comment re lines between rows of text
                                Rgds, Dave

                                Comment


                                • #36
                                  Ok Dave here I changed code to and got rid of lines between text. I have lots more to learn and do working with graphics. Thanks. Code below
                                  GRAPHIC DETACH , I do not have that yet. Do I need two of those for attached graphic or just on would do it for both?


                                  Code:
                                     '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                                     GRAPHIC BITMAP NEW 600, 400 TO BM1
                                     GRAPHIC ATTACH BM1, 0
                                     GRAPHIC CLEAR %WHITE , 0     '<-------
                                  
                                     GRAPHIC SET FONT fhnd1
                                     GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                                     GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                                     GRAPHIC COLOR %BLACK , %WHITE       '<-------
                                  
                                     T2="a123456789012345678901234567890"
                                     FOR I=1 TO 5: T1=STR$(I)+"   ": T1=MID$(T1,1,4)
                                         GRAPHIC PRINT  T1+T2 :  NEXT
                                     '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                                  Robert

                                  Comment


                                  • #37
                                    Chris , run your sample. Did not work.
                                    well, it did Something! And it didn't fail to trap the errors in your code (using #debug display)!

                                    Maybe this will help. The bitmap from which the two GRAPHIC controls are populated is 600x400. The two graphic controls have the same aspect ratio. So they are perfectly scaled copies of each other. Is this what you want to see, or maybe this doesn't work too?

                                    Code:
                                    #compile exe
                                    #dim all
                                    #debug display
                                    global hDlg as dword
                                    
                                    function pbmain () as long
                                       local I, BM1 as long, T1, T2 as string
                                       local skey as string
                                       local CX, CY, hfont as long
                                       dialog new pixels, 0, "TEST XPRINT RENDER N COPY", , , 1000, 600, %ws_thickframe or %ws_caption or %ws_sysmenu _
                                                         or %ws_minimizebox or %ws_maximizebox, to hDlg
                                    
                                       control add graphic, hDlg, 100, "xx", 50, 50,300, 200 ,%ss_sunken   'GRAPHIC JUST TO VIEW TEXT AND BOXES
                                       control add graphic, hDlg, 200, "xx",360,50,150, 100 ,%ss_sunken    'GRAPHIC TO PUT BITMAP IMAGE ENLARGED
                                    
                                       control add button , hDlg, 101 ,"&ZOOM"  ,160, 560, 60, 25, 'CALL ZOOM
                                    
                                    lab1:
                                       graphic bitmap new 600, 400 to BM1 'NB same aspect ratio as GRAPHIC controls
                                       graphic attach BM1, 0
                                       graphic clear %rgb_darkseagreen
                                       graphic color %black, %rgb_darkseagreen
                                       font new "COMIC SANS MS", 20 to hfont
                                       graphic set font hfont
                                       graphic chr size to CX, CY
                                       for i = 1 to 5: graphic set pos(50, i*CY*1.2): graphic print "HELLO!":next
                                       graphic width 3
                                       graphic box (30, 30)-(200, 30+i*CY*1.2),0,0, -2
                                    lab3:
                                       graphic attach hDlg, 200
                                       graphic stretch page BM1, 0, %mix_copysrc, %halftone
                                       graphic attach hDlg, 100
                                       graphic stretch page BM1, 0, %mix_copysrc, %halftone
                                    
                                       graphic inkey$ to skey
                                       dialog show modal hDlg
                                    end function

                                    Comment


                                    • #38
                                      You probably don't need GRAPHIC DETACH as GRAPHIC ATTACH redirects the GRAPHIC STREAM as required anyway but you should have
                                      Code:
                                        GRAPHIC ATTACH BM1, 0
                                        GRAPHIC BITMAP END
                                      When you are done with any Memory Bitmaps
                                      Rgds, Dave

                                      Comment


                                      • #39
                                        Problem when looking at a different smaller display (12.2") computer DSP, bitmap is not the same as the first larger (24") computer display.

                                        What makes the bitmap images different using the same size image ?
                                        (8 1/2" x 11" , 8.5* 96 = 816px and 11" * 96 = 1056px)

                                        I have uploaded three jpgs . 1 is typical 8 1/2" x 11" printout of a document which
                                        can print using xprint, 2 is 12.5" screen, 3 is 24" screen

                                        Could it be different PPI on two different displays ? (185.59 PPI for small display and
                                        95.78 PPI for larger display ?


                                        Tried plugging different numbers for image and stretch graphic , no fix for problem.

                                        below code on latest code. Put number for both display sizes.

                                        Code:
                                        #COMPILE EXE
                                        #DIM ALL
                                        
                                        GLOBAL hDlg AS DWORD
                                        
                                        FUNCTION PBMAIN () AS LONG
                                           LOCAL I, BM1, lDLGH, iDLGW, lGRH, lGRW, fhnd1 AS LONG, T1, T2 AS STRING
                                        
                                         DESKTOP GET CLIENT TO iDLGW, lDLGH         ':   ? STR$(iDLGW)+"   "+STR$(lDLGH) '(1920 1080 24" DSP) (1536 920 12.2" DSP)
                                         lDLGH=lDLGH * .9 : iDLGW=lDLGH * 1.3401    ':   ? STR$(iDLGW)+"   "+STR$(lDLGH) '(1302 975  24" DSP) (1110 828 12.2" DSP)
                                         lGRH= lDLGH *.98 : lGRW=lGRH * .7727       ':   ? STR$(lGRW) +"   "+STR$(lGRH)  '(736  953  24" DSP) (627 811 12.2" DSP)
                                        
                                           DIALOG NEW PIXELS, 0, "TEST XPRINT RENDER N COPY", , , iDLGW, lDLGH, %WS_THICKFRAME OR %WS_CAPTION OR %WS_SYSMENU _
                                                             OR %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX, TO hDlg
                                        
                                           FONT NEW "Times New Roman"   ,12,      0,       1,       0,       0         TO fhnd1
                                        
                                        '   CONTROL ADD GRAPHIC, hDlg, 100, "xx", 50, 50,300,200 ,%SS_SUNKEN    'GRAPHIC JUST TO VIEW TEXT AND BOXES
                                           CONTROL ADD GRAPHIC, hDlg, 200, "xx", iDLGW-(iDLGW*.825),10,  lGRW,lGRH,  %SS_SUNKEN    'GRAPHIC TO PUT BITMAP IMAGE ENLARGED
                                        
                                           CONTROL ADD BUTTON , hDlg, 101 ,"&ZOOM"  ,iDLGW-125, 40, 90, 26, 'CALL ZOOM
                                        
                                        
                                           '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                                           GRAPHIC BITMAP NEW iDLGW, lGRH TO BM1
                                        ''   GRAPHIC BITMAP NEW 816, 1056 TO BM1    '<----- tried this no change
                                           GRAPHIC ATTACH BM1, 0
                                           GRAPHIC CLEAR %WHITE , 0
                                        
                                           GRAPHIC SET FONT fhnd1
                                           'GRAPHIC BOX (10, 10) - (290, 190), 0, %BLUE
                                           'GRAPHIC BOX (50, 50) - (250, 150), 0, %BLUE
                                           GRAPHIC COLOR %BLACK , %WHITE
                                        
                                          T2="1234567890123456789012345678901234567890123456789012345678901234567890123456789012345"
                                          GRAPHIC SET POS (55,50)    ': ? STR$(58*.5)     55   50
                                          FOR I=1 TO 50: T1=STR$(I)+"   ": T1=MID$(T1,1,4)
                                          GRAPHIC PRINT POS(55) T1+T2:
                                          NEXT
                                           '******  THIS BITMAP TO BE USE TO DRAW TO SECOND GRAGHIC WINDOW 200
                                        
                                        
                                           GRAPHIC ATTACH hDlg, 200
                                           GRAPHIC STRETCH BM1, 300, (0,0)-(lGRW,lGRH) TO (0,0)-(lGRW,lGRH)
                                        ' GRAPHIC STRETCH BM1, 300, (0,0)-(816,1056) TO (0,0)-(816,1056)     '<----- tried this no change
                                           GRAPHIC BITMAP END
                                        
                                           DIALOG SHOW MODAL hDlg
                                        END FUNCTION
                                        
                                        CALLBACK FUNCTION ZOOM()
                                        '''
                                        END FUNCTION
                                        Attached Files
                                        Robert

                                        Comment


                                        • #40
                                          Originally posted by Robert Alvarez View Post
                                          ...
                                          Could it be different PPI on two different displays ? (185.59 PPI for small display and
                                          95.78 PPI for larger display ?
                                          ...
                                          Yes. Your control has to fit the screen.
                                          If your control has the proper aspect ratio to accommodate the 8.5x11 printout, and fits onscreen, it should be able to display the data equally well on either screen.
                                          Of course, your DIALOG has to be large enough to show the control, also.
                                          The world is strange and wonderful.*
                                          I reserve the right to be horrifically wrong.
                                          Please maintain a safe following distance.
                                          *wonderful sold separately.

                                          Comment

                                          Working...
                                          X