Option Explicit
Private Function MakeRect(pl_left As Long, pl_top As Long, pl_width As Long, pl_height As Long) As RECT
With MakeRect
.Left = pl_left
.Top = pl_top
.Right = pl_left + pl_width
.Bottom = pl_top + pl_height
End With
End Function
Private Sub Form_Load()
DrawFrameControl hDC, MakeRect(10, 10, 15, 15), DFC_CAPTION, DFCS_CAPTIONCLOSE
DrawFrameControl hDC, MakeRect(10, 30, 15, 15), DFC_CAPTION, DFCS_CAPTIONRESTORE
DrawFrameControl hDC, MakeRect(10, 70, 15, 15), DFC_CAPTION, DFCS_CAPTIONHELP
DrawFrameControl hDC, MakeRect(10, 50, 15, 15), DFC_CAPTION, DFCS_CAPTIONMAX Or DFCS_INACTIVE
DrawFrameControl hDC, MakeRect(10, 90, 15, 15), DFC_CAPTION, DFCS_CAPTIONMIN
DrawFrameControl hDC, MakeRect(10, 110, 15, 15), DFC_MENU, DFCS_MENUCHECK
DrawFrameControl hDC, MakeRect(10, 130, 15, 15), DFC_MENU, DFCS_MENUBULLET
DrawFrameControl hDC, MakeRect(30, 10, 15, 15), DFC_SCROLL, DFCS_SCROLLUP
DrawFrameControl hDC, MakeRect(30, 30, 15, 15), DFC_SCROLL, DFCS_SCROLLDOWN
DrawFrameControl hDC, MakeRect(30, 70, 15, 15), DFC_SCROLL, DFCS_SCROLLLEFT
DrawFrameControl hDC, MakeRect(30, 50, 15, 15), DFC_SCROLL, DFCS_SCROLLRIGHT Or DFCS_INACTIVE
DrawFrameControl hDC, MakeRect(30, 90, 15, 15), DFC_MENU, DFCS_MENUARROW
DrawFrameControl hDC, MakeRect(30, 110, 15, 15), DFC_MENU, DFCS_MENUARROWRIGHT
DrawFrameControl hDC, MakeRect(30, 130, 15, 15), DFC_MENU, DFCS_MENUBULLET
DrawFrameControl hDC, MakeRect(50, 10, 15, 15), DFC_SCROLL, DFCS_SCROLLCOMBOBOX
DrawFrameControl hDC, MakeRect(50, 30, 15, 15), DFC_SCROLL, DFCS_SCROLLSIZEGRIPRIGHT
DrawFrameControl hDC, MakeRect(50, 50, 15, 15), DFC_SCROLL, DFCS_SCROLLSIZEGRIP Or DFCS_INACTIVE
DrawFrameControl hDC, MakeRect(50, 70, 15, 15), DFC_BUTTON, DFCS_BUTTONCHECK
DrawFrameControl hDC, MakeRect(50, 90, 15, 15), DFC_BUTTON, DFCS_BUTTONCHECK Or DFCS_CHECKED
DrawFrameControl hDC, MakeRect(50, 110, 15, 15), DFC_BUTTON, DFCS_BUTTONCHECK Or DFCS_CHECKED Or DFCS_BUTTON3STATE
DrawFrameControl hDC, MakeRect(50, 130, 15, 15), DFC_BUTTON, DFCS_BUTTONRADIO
DrawFrameControl hDC, MakeRect(70, 30, 15, 15), DFC_BUTTON, DFCS_BUTTONRADIO Or DFCS_CHECKED
DrawFrameControl hDC, MakeRect(70, 50, 15, 15), DFC_BUTTON, DFCS_BUTTONRADIO Or DFCS_CHECKED Or DFCS_FLAT
DrawFrameControl hDC, MakeRect(70, 10, 50, 20), DFC_BUTTON, DFCS_BUTTONPUSH Or DFCS_MONO
DrawFrameControl hDC, MakeRect(70, 70, 50, 20), DFC_BUTTON, DFCS_BUTTONPUSH Or DFCS_PUSHED
DrawFrameControl hDC, MakeRect(70, 90, 50, 20), DFC_BUTTON, DFCS_BUTTONPUSH
Picture1.Left = 70: Picture2.Left = 70
Picture1.Top = 110: Picture2.Top = 130
DrawFrameControl Picture1.hDC, MakeRect(Picture1.ScaleWidth - 15, Picture1.ScaleHeight - 15, 15, 15), DFC_SCROLL, DFCS_SCROLLSIZEGRIP
DrawFrameControl Picture2.hDC, MakeRect(Picture2.ScaleWidth - 15, Picture2.ScaleHeight - 15, 15, 15), DFC_CAPTION, DFCS_CAPTIONHELP
End Sub
'following allows a sizer to be placed in the bottom corner and move with screen
'Private Sub Form_Resize()
'
' Me.Cls
' DrawFrameControl hDC, MakeRect(ScaleWidth - 15, ScaleHeight - 15, 15, 15), DFC_SCROLL, _
' DFCS_SCROLLSIZEGRIP
'
'End Sub