' Make the button arrow-shaped.
Private Sub Form_Load()
Dim pts(1 To 7) As POINTAPI
pts(1).X = 5
pts(1).Y = 15
pts(2).X = 35
pts(2).Y = 15
pts(3).X = 35
pts(3).Y = 5
pts(4).X = 55
pts(4).Y = 25
pts(5).X = 35
pts(5).Y = 45
pts(6).X = 35
pts(6).Y = 35
pts(7).X = 5
pts(7).Y = 35
Command1.Width = ScaleX(pts(4).X + 5, vbPixels, vbTwips)
Command1.Height = ScaleY(pts(5).Y + 5, vbPixels, _
vbTwips)
m_ButtonRegion = CreatePolygonRgn(pts(1), UBound(pts), _
ALTERNATE)
SetWindowRgn Command1.hWnd, m_ButtonRegion, True
End Sub
|