FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Resizeable screen formats
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Resizeable screen formats

Posted: Wed Jun 01, 2016 10:36 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Resizeable screen formats

Posted: Wed Jun 01, 2016 10:49 PM

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

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 12:59 AM
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?

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 01:12 AM

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.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 02:42 AM
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 (fw): Select all Collapse
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



50% of screen size

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 07:16 AM

How about EasyDialog of Timm?
Is it apart of EasyReport?
If so, Is it possible to include into Fivewin?

With Respectation.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 07:30 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 09:22 AM

Antonio,
it is compiled but when I run the example it want a dbf file, wher eI can found it ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 09:23 AM

I have not used it so I can't tell you

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 01:59 PM
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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

Re: Resizeable screen formats

Posted: Fri Jun 03, 2016 06:47 PM

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

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion