FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dialog No Shadow, if NON MODAL FRAME.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Dialog No Shadow, if NON MODAL FRAME.
Posted: Wed Sep 13, 2017 06:26 AM
if I set DIALOG and NO CAPTION. The Dialog will not has SHADOW and normal Dialog.


I try oDlg:Shadow() but it has a little problem, shadow will disappear when I click on other area.

I need the shadow as normal dialog as below.
How can I make shadow for NO CAPTION DIALOG? Is it possible?
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: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Wed Sep 13, 2017 04:05 PM
This example seems to work fine:

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd

   BuildDialog()

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

function BuildDialog()

   local oDlg

   DEFINE DIALOG oDlg STYLE WS_POPUP

   ACTIVATE DIALOG oDlg NOWAIT ;
      ON INIT ( oDlg:Shadow(), oDlg:PostMsg( WM_SETFOCUS ) ) CENTER

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 01:38 AM
Dear Antonio,

Could you try this code (I call dialog this way) and click on any place in Main Window. The shadow will be lost.
Antonio Linares wrote:This example seems to work fine:


Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd

   @ 50, 50 BUTTON 'Dlg' OF oWnd SIZE 60, 40 PIXEL  ACTION BuildDialog()
    
//   BuildDialog()

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

function BuildDialog()

   local oDlg

   DEFINE DIALOG oDlg STYLE WS_POPUP

   ACTIVATE DIALOG oDlg ; // NOWAIT ;
      ON INIT ( oDlg:Shadow(), oDlg:PostMsg( WM_SETFOCUS ) ) CENTER

return nil
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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 02:19 AM
Dutch, your code also run OK for me

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 03:50 AM
Dear Navarro,

Do you click on Main Windowm, yet?
cnavarro wrote:Dutch, your code also run OK for me
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: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 04:45 AM
dutch wrote:Dear Navarro,

Do you click on Main Windowm, yet?
cnavarro wrote:Dutch, your code also run OK for me


Not, only in button
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 05:47 AM
Dear Navarro,

If you click on Main Window or Button again, the shadow will disappear.
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: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 09:13 AM
Yes I noticed the same :



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 12:33 PM

Dutch,
Yes you are right

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Dialog No Shadow, if NON MODAL FRAME.
Posted: Thu Sep 14, 2017 12:47 PM

Dear Navarro,

There are some point of its behavior.

  1. ::Shadow() is paint before dialog, sometime it show a lit slow. You will see the step. shadow and dialog
  2. If you press button many time the shadow will paint many time also. It will show darker and darker.

Thanks so much.

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)

Continue the discussion