MDI child window appearance

Re: MDI child window appearance

Postby Lailton » Thu Dec 29, 2022 11:27 pm

Hi Silvio,

If you resize it to much the "bitmap" can't be paited, then it is reason for why the skin disapear.
then you need adjust the oDlg:aMinMaxInfo to avoid that :D

in case you want some different style you can make your own by editing the BMPs, please check the folder black_skin, blue_skin and simple_skin ( inside samples of fwh ).

Any question let me know.

Silvio.Falconi wrote:
Antonio Linares wrote:Dear Silvio,

Look at this! Thanks to Master Lailton! :-)

EXE and new theme:
https://github.com/FiveTechSoft/FWH_tools/blob/master/mdi_skin_w11.zip



playing with the window I got this error

Image

so i did a test on all three window types and i saw this

Image

however even in the dialog there is some error if for example I use a resizable dialog with a folder inside it gives me an error in the sense that it shows the interface incorrectly as you can see below

Image

dialog source
Code: Select all  Expand view
#include "fivewin.ch"
#include "constant.ch"

Function Configurazione()
   local oDlg, oFld,oFont,oBold
   local oBtnConfirm,oBtnClose
   local aprompts:={"Azioni all'avvio","Aspetto Interfaccia","Connessioni","Premi"  }
   local cTitle:= "Configurazione applicazione"
   local oSkin
   local aGet:=array(30)
   local oSay

DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 12
    DEFINE FONT oBold NAME "MS Sans Serif" SIZE 0, 12 BOLD

DEFINE DIALOG  oDlg ;
      SIZE 500, 250  PIXEL TRUEPIXEL RESIZABLE ;
      TITLE cTitle     COLOR 0, CLR_WHITE FONT oFont  STYLE WS_POPUP

       @ 1,1 FOLDER oFld Prompts aprompts OF oDlg;
               SIZE oDlg:nWidth-5,oDlg:nHeight-30




     @ 100,10 Say oSay Prompt  "NB. Le modifiche saranno effettive al prossimo avvio del programma" of oDlg SIZE 350,18 PIXEL  TRANSPARENT
     @ 100,10 BUTTON oBtnConfirm PROMPT "OK" of oDlg  SIZE 80,22 DEFAULT ACTION ( oDlg:end( IDOK  ) )
     @ 100,10 BUTTON oBtnClose PROMPT "Annulla" of oDlg  SIZE 80,22 CANCEL ACTION ( oDlg:end( IDCANCEL ) )





 oDlg:bResized  := <||
        local oRect        := oDlg:GetCliRect()
        oSay:nLeft    := oRect:nLeft+5
        oSay:nTop     := oRect:nBottom - 25
                oBtnConfirm:nLeft    := oRect:nRight - 200
                oBtnConfirm:nTop     := oRect:nBottom - 25
                oBtnClose:nLeft    := oRect:nRight - 100
                oBtnClose:nTop     := oRect:nBottom - 25
                oFld:nTop          := oRect:nTop
                oFld:nWidth        := oRect:nWidth - 10
                oFld:nHeight      := oRect:nBottom - 30
        return nil
        >
        oDlg:aMinMaxInfo := { nil, nil, ,, 600, 350,600, 350 }

          oDlg:bStart := {|| oSkin := Skin( oDlg, "Blue_skin" ),;
                       oSkin:this[ 10 ]:bLButtonUp := nil  ,;
                       oSkin:this[ 11 ]:bLButtonUp := nil ,;
                       oSkin:this[ 9 ]:bLButtonUp := nil }

 ACTIVATE DIALOG oDlg center ;
       ON INIT  ( EVAL( oDlg:bResized))

 return nil
//----------------------------------------------------------------------------------------------//
 
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 153
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: MDI child window appearance

Postby Silvio.Falconi » Fri Dec 30, 2022 8:29 am

Lailton wrote:Hi Silvio,

If you resize it to much the "bitmap" can't be paited, then it is reason for why the skin disapear.
then you need adjust the oDlg:aMinMaxInfo to avoid that :D

in case you want some different style you can make your own by editing the BMPs, please check the folder black_skin, blue_skin and simple_skin ( inside samples of fwh ).

Any question let me know.



Hi Laiton,
I have to prevent end user operations in order to avoid problems, the fact of using oDlg:aMinMaxInfo can be a deterrent but I have seenon Tkin that the whole set is not fully functional, i.e. if the dialog is resizable and the user wanting to resize the dialog can do it but with difficulty because unlike the normal dialog when you approach the mouse to the edges fwh shows the cursor (arrows) to enlarge or shrink, with Tskin a effects myself I find it difficult to enlarge or shrink a dialog .

I still don't understand if using Tskin is the best solution, I really don't understand how other languages ( Delphi. Vb, C++ ) have Mdi Child windows in order to take the OS theme, and in fwh the windows have the style of win8/xp i.e. they do not have the same style of win10.

I am firmly convinced that perhaps a solution could be found, perhaps loading the net Dll like "CefSharp.WinForms.dll" or "System.Windows.Forms.DataVisualization.dll" to recreate the childwindows but I wouldn't be able

for a sample :https://help.syncfusion.com/windowsforms/form/mdicustomization


Aesthetically it wouldn't be nice to use different windows, I'm trying to understand if Tskin could work for both dialogs and windows, it's not about having different styles or colors, it's about having a working and homogeneous system
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: MDI child window appearance

Postby Antonio Linares » Fri Dec 30, 2022 9:23 am

Dear Sylvio,

We can't use those .NET DLLs from Harbour

IMO Class TSkin is a very good solution
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MDI child window appearance

Postby Lailton » Fri Dec 30, 2022 4:36 pm

Hi Silvio,

I got it, then I dont think that TSKIN is what you want. the main idea about TSKIN is to make the dialog different.

I remember that window API too provide something like "UxTheme" https://learn.microsoft.com/en-us/windo ... indowtheme
where is possitble to change some colors or read information about the theme. I have not used that because I was affraid it not works for all the Windows Versions, so for my needed the TSKIN in that moment was my solution.

Note:
My inspiration for the TSKIN was a DLL from "codejock" a commercial component to create skin, that works fine. but there is a price and a dependency to be added to your system ( I dont really like 3rd dll into my project ).
https://codejock.com/downloads/visualstyles.asp

I am sure if you search here on the forum by codejock you will find several post about how to use it in case you want to try.

Anyway, I hope you will find a best way to do what you want.

Happy New Year.
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 153
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: MDI child window appearance

Postby Lailton » Fri Dec 30, 2022 4:49 pm

About codejock again,
It is the MDI example Silvio, You will like it :)

https://drive.google.com/file/d/1yVxDfc ... share_link

An example how to use it:
viewtopic.php?f=3&t=15706&p=81371&hilit=CodeJock.SkinFrameWork&sid=5aebc763970f543731c8dbdb4a4cb911#p81371

IMO the best company with skin solution is that one. their TOOLKIT offer several kind of style.
( I dont use it actually, but looks fantastic :) )
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 153
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: MDI child window appearance

Postby vilian » Fri Dec 30, 2022 5:37 pm

Hi Lailton,

Is the RibbonBar also affected for this new class ? Could you show us an example with a RibbonBar?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 977
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: MDI child window appearance

Postby Lailton » Fri Dec 30, 2022 11:39 pm

Hey Vilian,

I have not tried that, you can try it by yourself if you are using ribbonbar. the skin code is one single line:
oDlg:bStart := {|| oSkin := Skin( oDlg, "Blue_skin" ) }

where the odlg can be dialog or window and the blue_skin is the folder that contains the skin. try and let us to know the result.

:D
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 153
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: MDI child window appearance

Postby Silvio.Falconi » Sun Jan 01, 2023 10:14 pm

Lailton wrote:Hi Silvio,

I got it, then I dont think that TSKIN is what you want. the main idea about TSKIN is to make the dialog different.

I remember that window API too provide something like "UxTheme" https://learn.microsoft.com/en-us/windo ... indowtheme
where is possitble to change some colors or read information about the theme. I have not used that because I was affraid it not works for all the Windows Versions, so for my needed the TSKIN in that moment was my solution.

Note:
My inspiration for the TSKIN was a DLL from "codejock" a commercial component to create skin, that works fine. but there is a price and a dependency to be added to your system ( I dont really like 3rd dll into my project ).
https://codejock.com/downloads/visualstyles.asp

I am sure if you search here on the forum by codejock you will find several post about how to use it in case you want to try.

Anyway, I hope you will find a best way to do what you want.

Happy New Year.


Image
can U make the same color theme of Win 10 ( I have Windows 10 Pro version 21H2) the header are smaller and are white color then the button are different , I tried But I not Know How make it easy...then I not Know win 11
just to have homogeneity between the theme of the main window and the sub windows , and then with the same system I can also use in the dialogs even if in the dialogs I have no theme problems, i.e. the dialogs respect the theme of the main Mdi , the sub windows child do not respect it, I will continue not to understand but I adapt
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: MDI child window appearance

Postby vilian » Wed Jan 04, 2023 6:23 pm

Lailton wrote:Hey Vilian,

I have not tried that, you can try it by yourself if you are using ribbonbar. the skin code is one single line:
oDlg:bStart := {|| oSkin := Skin( oDlg, "Blue_skin" ) }

where the odlg can be dialog or window and the blue_skin is the folder that contains the skin. try and let us to know the result.

:D

I haven't got this new version yet. Could you just test this with \fwh\samples\ribbon.prg for dark theme ?
I would love to know the result before update my FWH version ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 977
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: MDI child window appearance

Postby leandro » Wed Jan 04, 2023 10:25 pm

Hola buenas tardes para todos, estoy intentando compilar el ejemplo skin3.prg, con la ultima versión de fwh, pero me sale el siguiente error:
Code: Select all  Expand view

┌────────────────────────────────────────────────────────────────────────────┐
?FiveWin for xHarbour 22.12 - Dec. 2022          Harbour development power  │▄
?(c) FiveTech 1993-2022 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘?
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀?
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20221118)
Copyright 1999-2022, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'skin3.prg' and generating preprocessed output to 'skin3.ppo'...
Generating C source output to 'skin3.c'...
Done.
Lines 26, Functions/Procedures 1, pCodes 335
Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc.
skin3.c:
Borland Resource Compiler  Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation.  All rights reserved.

Error guiddef.h 147 11: Cannot open file: string.h
* Linking errors *
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: MDI child window appearance

Postby Antonio Linares » Thu Jan 05, 2023 6:33 am

Estimado Leandro,

Deberias tener dicho fichero en c:\bcc7\include\windows\crtl\string.h
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MDI child window appearance

Postby leandro » Fri Jan 06, 2023 1:46 pm

Antonio gracias por responder, el archivo se encuentra en la ruta indicada en el bat buildx.bat
Code: Select all  Expand view
@ECHO OFF
CLS
ECHO 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커
ECHO ?FiveWin for xHarbour 22.12 - Dec. 2022          Harbour development power  넵
ECHO ?(c) FiveTech 1993-2022 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10
ECHO 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸?
ECHO  賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽賽?

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=c:\fwh2212
if "%XHDIR%" == "" set XHDIR=c:\xhar2210
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\bcc740
set fwh=%FWDIR%

Image

Obtengo el mismo error al intentar compilar erdsample.prg
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: MDI child window appearance

Postby Antonio Linares » Sat Jan 07, 2023 7:22 am

Leandro,

En tu primer post, el error se produce al llamar al compilador de recursos:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.

Error guiddef.h 147 11: Cannot open file: string.h

Luego es al compilador de recursos al que tienes que proporcionarle el path de string.h
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MDI child window appearance

Postby leandro » Thu Mar 23, 2023 9:12 pm

Antonio como vas?

Que pena molestar de nuevo por esto, pero no comprendo cuando nos dices que debemos agregar esa información al compilador de recursos. No tenemos ni idea como se hace, jejejejeje no se cual es el compilador de recursos.

Tambien intente compilar el ejemplo desde fivedit, pero nos salieron estos errores

Code: Select all  Expand view

Open error:
===============================
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  Version: FWH 22.06
   Error occurred at: 23/03/2023, 16:35:35

Stack Calls
===========
   Called from:  => DBUSEAREA( 0 )
   Called from: .\source\function\ERTOOLS.PRG => OPENLANGUAGE( 1222 )
   Called from: .\source\function\EREPORT.PRG => DECLAREPUBLICS( 537 )
   Called from: .\source\function\EREPORT.PRG => EREPORT( 99 )
   Called from: pcode.hrb => FWHFUNC001( 3 )
   Called from:  => HB_HRBRUN( 0 )

Script error at line: 3
 


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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: MDI child window appearance

Postby Antonio Linares » Fri Mar 24, 2023 7:49 am

Estimado Leandro,

el compilador de recursos de Borland es el c:\bcc7\bin\rc.exe
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 88 guests