Dialog No Shadow, if NON MODAL FRAME.

Dialog No Shadow, if NON MODAL FRAME.

Postby dutch » Wed Sep 13, 2017 6:26 am

if I set DIALOG and NO CAPTION. The Dialog will not has SHADOW and normal Dialog.
Image

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?
Image
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1550
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby Antonio Linares » Wed Sep 13, 2017 4:05 pm

This example seems to work fine:

Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42127
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby dutch » Thu Sep 14, 2017 1: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: Select all  Expand view  RUN
#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 19.01 / 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)
User avatar
dutch
 
Posts: 1550
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby cnavarro » Thu Sep 14, 2017 2:19 am

Dutch, your code also run OK for me

Image
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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby dutch » Thu Sep 14, 2017 3:50 am

Dear Navarro,

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

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1550
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby cnavarro » Thu Sep 14, 2017 4: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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby dutch » Thu Sep 14, 2017 5:47 am

Dear Navarro,

If you click on Main Window or Button again, the shadow will disappear.
Image
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1550
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby ukoenig » Thu Sep 14, 2017 9:13 am

Yes I noticed the same :

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Dialog No Shadow, if NON MODAL FRAME.

Postby dutch » 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 19.01 / 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)
User avatar
dutch
 
Posts: 1550
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

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