Page 2 of 2

Re: Resizeable screen formats

PostPosted: Wed Jun 01, 2016 10:36 pm
by Antonio Linares
it is the way they are designed in Windows GUI

A text has a different height from a checkbox or a combobox, etc.

Of course you can simulate text coordinates, using different fonts, etc. but then your dialogs will not look like a standard Windows app

Pritpal Bedi implemented a GT driver to do that. FWH uses a different approach to create true Windows looking apps

Re: Resizeable screen formats

PostPosted: Wed Jun 01, 2016 10:49 pm
by TimStone
That is interesting. When creating a resource, I use the same sizes for Static and Edit controls ( Say and Get equivalents ). Then I can place them on the exact same lines. ( I edit the .rc manually, and thus I'm pixel accurate for all placements horizontally and vertically ).

The fonts are inherited from Windows settings. It works quite cleanly. However, it can be a bit more work.

I asked about this because all of the samples define using @ SAY and @ GET and some of the feature alignments depend on those rather than defined dialogs in an .rc.

Tim

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 12:59 am
by James Bott
Tim,

I did some testing and I wonder about doing any dialog resizing. I modified TDialog to automatically resize a dialog (from an RC file) and all the controls based on the screen size. The top left dialog in the attached image is the standard size. The bottom left one was resized to occupy the proportionally same width and height of the screen as the small dialog would if it was on a standard 800x600 pixel screen. My screen is 1366 x 768. The dialog on the right is a standard dialog that is part of the Windows 10 OS. Obviously Windows is not resizing it's own dialogs.

So the original FW dialog looks similar to the Windows 10 OS dialog. The resized dialog looks strange. It would look stranger still had I resized the font also. My eyes are not all that good anymore but I can still see the small font OK.

So, I wonder why you want to resize the dialogs? Maybe you could show us a sample dialog that you want to resize?

Image

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 1:12 am
by TimStone
James,

Actually I do not want to resize the dialogs, but I've had a few clients think that would be a great idea. I really needed to get some input, do some tests, and then I can respond intelligently.

We will have some interesting issues with future Windows 10 displays. I have a Surface Book with a high resolution monitor. However, Windows likes to adjust the image automatically. I have two display sizes the user can select. The widescreen mode is 1920 x 1080. It looks great on a regular hi-res monitor. However, on the Surface Book, it has major display issues. You can turn off that display resizing on an application, but then it just doesn't fit well to the monitor because the fonts become tiny. So I set the program to the 1024 x 768 size. The problem with that is the data fields are very compressed and for my clients who have "older eyes", they complain it is not as easy to see. It works on the Surface Book, but still, it's all those fields pressed together. The issue is the amount of data that needs to be displayed, and I only have the top half of the screen, because in most cases the lower half is a browse control for the full database.

Pleasing clients is the challenge ... but I try. They are the ones who pay for the support and updates so solutions need to be found.

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 2:42 am
by Bayron
I came up with my own solution to screen resolution...
It was involved with some old fashion math calculations from screen resolution...

So I control the size of every control

Code: Select all  Expand view
nPorcentaje := 50;  //Taken from a user defined configuration file

        nX1 := ( ( ( oDIALOG:nWidth - ( oDIALOG:nWidth * nPorcentaje )  ) / 2 ) / 2 )
        nX2 := ( ( oDIALOG:nWidth / 2 )- nX1 )
        nY1 := ( ( ( oDIALOG:nHeight - ( oDIALOG:nHeight * nPorcentaje ) ) / 2 ) / 2 )
        nY2 := ( ( oDIALOG:nHeight / 2 ) - nY1 )
       
        aAdd( Cuadro1 , { nY1 , nX1 , nY1 + ( INT( ( nY2 - nY1 ) * .46 ) ) , ;
              nX1 + ( INT( ( nX2 - nX1 ) * .40 ) ) } )
        aAdd( Cuadro2 , { nY1 + 5 , nX1 + ( INT( ( nX2 - nX1 ) * .40 ) + 4 ) , ;
              nY1 + ( INT( ( nY2 - nY1 ) * .57 ) - 2 ) , nX1 + ( INT( ( nX2 - nX1 ) )- 1 ) } )
        aAdd( Cuadro3 , { nY1 + ( INT( ( nY2 - nY1 ) * .46 ) ) , nX1 , ;
              nY1 + ( INT( ( nY2 - nY1 ) ) ) , nX1 + ( INT( ( nX2 - nX1 ) * .40 )  ) } )
        aAdd( Cuadro4 , { nY1 + 5 + ( INT( ( nY2 - nY1 ) * .57 ) ) , ;
              nX1 + 5 + ( INT( ( nX2 - nX1 ) * .40 ) ) , nY1 + ( INT( ( nY2 - nY1 ) - 5 ) ) , ;
              nX1 + ( INT( ( nX2 - nX1 ) * .60 ) ) } )
        aAdd( Cuadro5 , { nY1 + ( INT( ( nY2 - nY1 ) * .57 ) ) , ;
              nX1 + ( INT( ( nX2 - nX1 ) * .60) ) , nY1 + ( INT( ( nY2 - nY1 ) - 1 ) ) , ;
              nX1 + ( INT( ( nX2 - nX1 ) ) - 1 ) } )
       

DEFINE FONT oFont1 NAME 'Verdana' ;
            SIZE 0 , ( 22 * ( Min ( oDIALOG:nWidth / 1680 , oDIALOG:nHeight / 1050 ) ) ) * nPorcentaje ; //To compensate for wide screen and standard resolutions...
            BOLD


@ ( Cuadro1[1][1] + ( Btn1Height * 1 ) + 9 ) , ( Cuadro1[1][2] + ( Btn1Width * 0 ) +  8 ) ;
            BTNBMP oBtnF[ 1] OF oDIALOG ;
            SIZE ( Btn1Width - 4 ) , ( Btn1Height - 4 ) ;
            CENTER PIXEL ADJUST NOBORDER ;
            FONT oFont1 ;
            PROMPT "BOTON1"




100% of screen size

Image

50% of screen size

Image

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 7:16 am
by dutch
How about EasyDialog of Timm?
Is it apart of EasyReport?
If so, Is it possible to include into Fivewin?

With Respectation.

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 7:30 am
by Antonio Linares

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 9:22 am
by Silvio.Falconi
Antonio,
it is compiled but when I run the example it want a dbf file, wher eI can found it ?

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 9:23 am
by Antonio Linares
I have not used it so I can't tell you

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 1:59 pm
by James Bott
Tim,

Surface Book


Ah, yes, that was the reason Microsoft came up with the whole new "Modern" interface design.

Can we see a screenshot of the entire screen from the Surface Book showing the issue?

Of course, you would need to also resize the font which I didn't do in my test.

Also, don't you have to put up the on-screen keyboard? Doesn't that take up half the screen? It would seem that you really need a whole new interface design for the Surface Book (and other tablets).

Regards

Re: Resizeable screen formats

PostPosted: Fri Jun 03, 2016 6:47 pm
by TimStone
James,

The Surface Book is actually a notebook computer. Yeah, you can detach the screen and use it as a tablet, but I wouldn't do that with this application. Also, with the pen, you can use handwriting for input and that takes up very little screen space.

The issue is Microsoft's resizing feature and those algorithms are changing as they receive input. Time will tell how it resolves, and how it ends up applying to other Win 10 devices, especially desktops.

Screen shots are difficult, but perhaps lunch soon.

Tim