sample
I tried with
- Code: Select all Expand view RUN
#include "fivewin.ch"
Function sample()
local oDlg,oFont
local nHt := Int( ScreenHeight() * 0.2 )
local nWd := Int( ScreenWidth() * 0.2 )
local oChk
local oGet,cGet:= space(100)
local oSay
local ncolor1 := RGB(245,245,235)
local ncolor2 := RGB(250,250,245)
local lNormal
DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
RESIZABLE TiTle "test" COLOR CLR_BLACK, RGB( 245,245,235) ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX, WS_THICKFRAME )
@ 10,10 CheckBox oChk Var lNormal Prompt "check" SIZE 100,20 of oDlg ;
on change ( If(lNormal,(MakeBox(oGet,oDlg), oGet:enable()),;
(MakeBox(oGet,oDlg) , oGet:disable())),;
oGet:refresh() )
@ 62, 10 SAY oSay PROMPT "Test Get" SIZE 100,25 PIXEL OF oDlg TRANSPARENT FONT oFont
@ 80, 10 GET oGet VAR cGet SIZE 100,24 PIXEL OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
Function MakeBox(oControl,oDlgEdit)
local oBox
local aRect := GetClientRect(oControl:hWnd )
local hDC := oControl:GetDC()
local nOldMode := SetBkMode( hDC, 1 )
local hBru := TBrush():New( "BDIAGONAL",RGB(195,195,185) )
local hOldBrush := SelectObject( hDC, hBru )
FillRect( hDC,{aRect[1] , aRect[2] ,aRect[4] , aRect[3] }, hBru )
SelectObject( hDC, hOldBrush )
SetBkMode( hDC, nOldMode )
DeleteObject( hBru )
oControl:ReleaseDC()
RETURN NIL
but not work