|
-
Oct 29th, 2000, 10:50 AM
#1
Thread Starter
Lively Member
Hi all,
Anyone knows how I can make a round form or button instead of the regular rectangular ones?
Thanks!!
-
Oct 29th, 2000, 11:06 AM
#2
-
Oct 29th, 2000, 01:25 PM
#3
Hyperactive Member
I found this somewhere on the net.
Code:
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
Enjoy
-
Oct 29th, 2000, 01:30 PM
#4
Hyperactive Member
OK. Now anyone know how to make an irrelgular shaped form. For example the digitool skin of winamp?
-
Oct 29th, 2000, 04:07 PM
#5
Frenzied Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|