FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Checkbox transparent win 7 not win xp
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Checkbox transparent win 7 not win xp
Posted: Sat Nov 19, 2011 09:18 PM

I have a checkbox that is transparent win 7 not win xp. Using resources, Transparent set at the define dialog.
All workinhg fine except not in windows XP. Any ideas.

Thanks in advance

Thank you

Harvey
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Sat Nov 19, 2011 11:50 PM
Harvey,

maybe a transparent-problem with Resources ?

I changed all my Checkboxes using TSelex ( looks much better ).

or use a extra SAY and resize the Checkbox as small as possible :

REDEFINE CHECKBOX oCheck2 VAR lCheck2 ID 230 OF oDlg1 UPDATE
add a extra SAY :
REDEFINE SAY oSay1 VAR cSay1 ID 231 OF oDlg1 FONT oFootFont COLOR 128

TSelex-Resource :

CONTROL "", 220, "TSELEX", 0 | WS_CHILD | WS_VISIBLE, 211, 83, 58, 28



Code (fw): Select all Collapse
REDEFINE SELEX oSelect VAR nOption1 OF oDlg1 ID 220;
ITEMS "&ON", "&OFF";
GRADIENT OUTTRACK { { 0.5, 16443068, 16312263 }, ;
     { 0.5, 16312263, 16443068 } } ;
GRADIENT INTRACK { { 1, 5426223, 1071100 }, ;
     { 1, 1071100, 5426223 } } ;
THUMBSIZE 20, 20 ROUNDSIZE 5 ;
COLOR THUMB 14853684 ;
COLORTEXT 128, 32768 ; 
TITLE "Select" TOP ;
FONT oFootFont ;
ACTION( If( nOption1 == 2, oDlg1:End(), ) )



Best 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: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Checkbox transparent win 7 not win xp
Posted: Sun Nov 20, 2011 07:38 AM

Uwe:
Using the say worked fine. Thanks.
Just one more color problem. The transparent clause doesn't work with an undefined group.
Any suggestions?

Thank you

Harvey
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Sun Nov 20, 2011 11:08 AM
Harvey,

using Resources, the same transparent-problem like Checkboxes.
( doesn't work on Dlg-ON INIT or PAINT )

Maybe You can include Class SBUTTON from Manuel Mercado ?
using Resources works fine for Lines, Groups and Boxes like You can see.
I will have a look at my Tool ( Screenshot ), doing some more work on it.



Best 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: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Mon Nov 21, 2011 09:47 AM
Harvey,

it seems to be a Brush-painting-problem of Resources.
Moving a Color-define from Dlg-INIT like :

DEFINE DIALOG oDlg1 RESOURCE "Selection" TRANSPARENT
...
// COLOR
// -----------
DEFINE BRUSH oBrush COLOR 16443068

// BMP-BRUSH
// -----------
// DEFINE BRUSH oBrush FILE c_path + "\Images\BluStone.Bmp"

/*
// GRADIENT
// ---------------
aGrad := { { 0.5, 10899511, 16443068 }, { 0.5, 16443068, 10899511 } }
hDC = CreateCompatibleDC( oDlg1:GetDC() )
hBmp = CreateCompatibleBitMap( oDlg1:hDC, 200, 600 )
hBmpOld = SelectObject( hDC, hBmp )
GradientFill( hDC, 0, 0, 600, 200, aGrad, .T. )
DeleteObject( oDlg1:hBrush )
oBrush := TBrush():New( ,,,, hBmp )
oBrush:Cargo := aGrad
SelectObject( hDC, hBmpOld )
ReleaseDC(hDC)
*/

oDlg1:SetBrush( oBrush )
...
ACTIVATE DIALOG oDlg1 CENTERED ;
ON INIT ( oDlg1:Move( 30, 10, oDlg1:nWidth, oDlg1:nHeight, .f. ), oBrw1:SetFocus() )

...



works, but only for COLORS !!!
using BMP-brush or Gradient, the Group covers the Checkboxes






Best 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: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Mon Nov 21, 2011 07:06 PM
There seems to be a problem with ascending Field-order from Resource.
Changing the Order : lowest = Group / higher = Checkboxes, it works .
A higher Group ID covers the included Controls.



Best 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: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Checkbox transparent win 7 not win xp
Posted: Mon Nov 21, 2011 07:37 PM

Uwe
Thanks for all the input. I'll be working on it in next couple of days. I'll keep you posted.

Regards

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Checkbox transparent win 7 not win xp
Posted: Mon Nov 21, 2011 10:37 PM

Uwe,

Thanks for your superb help as usual :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Tue Nov 22, 2011 03:27 PM
Thank You very much for the Response,

my new extended Res.-Tester will cover and test
all Controls ( transparent Painting )
There will be a complete new Download-file
A Resource-tester is still missing in my Tool-Collection !!!

Testing :
1. Groups, Radios and Checkboxes on different Dialog-backgrounds
2. Groups, Radios and Checkboxes on different TFoldex-backgrounds

The Dialog-background and Textcolor can be defined from the xBrowse-selection.



Best 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: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: Checkbox transparent win 7 not win xp
Posted: Tue Nov 22, 2011 09:26 PM

Uwe:
You have been great helping me out.
Not using gradient....can't get it to work.

But one more qusetion. How can you color: msfInfo(), MsgAlert(), msgget(), msgYesNo() etc.

Thanks for the help.

Thank you

Harvey
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Checkbox transparent win 7 not win xp
Posted: Tue Nov 22, 2011 10:14 PM
Harvey,
Gradient works fine. You can have a closer look, as soon I finished the new Tool for Download.

MsgAlert , MsgYesNo ... is Window-standard.
You can create Your own fancy Messages, or have a look at the post from Ramesh :

Ramesh Babu P-Functions :
viewtopic.php?f=3&t=22834



Tools :
viewtopic.php?f=3&t=22226&p=118317&hilit=message+tool#p118317



Best 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.

Continue the discussion