Hi all,
Anyone knows how I can make a round form or button instead of the regular rectangular ones?
Thanks!!
Printable View
Hi all,
Anyone knows how I can make a round form or button instead of the regular rectangular ones?
Thanks!!
You can't with the normal CommandButton control. :(
I found this somewhere on the net.
EnjoyCode:Private Declare Function CreateEllipticRgn Lib "gdi32" _
(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" _
(ByVal hWnd As Long, ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long
Private Sub Form_Load()
Show 'The form!
SetWindowRgn hWnd, _
CreateEllipticRgn(0, 0, 300, 200), _
True
End Sub
OK. Now anyone know how to make an irrelgular shaped form. For example the digitool skin of winamp?
Making complex regions can be complex. You may have to use the sin ,cos and other operators. The easiest way is to combine regions using the CombineRgn API.
Code:Public Declare Function CombineRgn Lib "gdi32" Alias "CombineRgn" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long