nageswaragunupudi wrote:ContrastClr( nClrBack )
nageswaragunupudi wrote:ContrastClr( nClrBack )
#include "fivewin.ch"
function Main()
local aDlg[ 30 ], oFont, nClrText, nClrBack, n
local nTop := 0
local nLeft := 1200
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20
for n := 1 to 30
nClrBack := HB_RandomInt( 0, CLR_WHITE )
nClrText := ContrastClr( nClrBack )
DEFINE DIALOG aDlg[ n ] SIZE 150,100 PIXEL TRUEPIXEL ;
COLOR nClrText, nClrBack
@ 40,20 SAY "ANY TEXT" SIZE 110,20 PIXEL OF aDlg[ n ] CENTER VCENTER ;
COLOR nClrText, nClrBack FONT oFont
if nLeft >= 1100
nTop += 140
nLeft := 100
else
nLeft += 200
endif
if n == 30
ACTIVATE DIALOG aDlg[ n ] ON INIT aDlg[ n ]:Move( nTop, nLeft ) ;
VALID ( AEval( aDlg, { |oDlg| oDlg:End() }, 1, 29 ), .t. )
else
ACTIVATE DIALOG aDlg[ n ] NOMODAL ON INIT aDlg[ n ]:Move( nTop, nLeft )
endif
next
RELEASE FONT oFont
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 62 guests