Const SM_CXFRAME=32
Const SM_CYFRAME=33
Const SM_CYSIZE 31
The height of a button in a window caption or title bar'
.in pixels
()Sub Button2_on
Dim fWidth As Long
Dim fHeight As Long
Dim RndCol As Long
Dim hBrush As Long
Dim Ret As Long
fWidth=GetSystemMetrics(SM_CXFRAME)*2
(fHeight=GetSystemMetrics(SM_CYFRAME)*2+GetSystemMetrics(SM_CYSIZE
-Ret=SetRect(rct,5,5,GetWidth-fWidth-5, GetHeight
(fHeight-5
hBrush=CreateHatchBrush (HS_DIAGCROSS, vbBlue) 'Draw with blue DIAGCROSS for VB
(Ret=FrameRect(hfDC,rct,hBrush
(Ret=DeleteObject(hWhiteBrush
End Sub