|
-
Apr 4th, 2004, 05:02 PM
#1
Thread Starter
Fanatic Member
Round Form
Hi, i am trying to create a ROUND form in vb6. At each point, north south, east and west, there is going to be a picture box with a gif image inside. When the user hovers the mouse over the picturebox, the picturebox opacity should be 1, whereas it would be 0.7 when the program is started-same as the form (or there abouts).
How is it possible to do this in VB6. I found a program in vb.net, but the code doesn't work in vb6 as ive tried.
Does anybody know how do this?
-
Apr 4th, 2004, 05:27 PM
#2
Fanatic Member
Round Form
VB Code:
Option Explicit
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
-
Apr 4th, 2004, 05:32 PM
#3
You should be sure to release the region created by CreateEllipticRgn by using the DeleteObject API.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|