Results 1 to 3 of 3

Thread: Round Form

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    509

    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?

  2. #2
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    Round Form


    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function CreateEllipticRgn Lib "gdi32" _
    4. (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
    5. ByVal Y2 As Long) As Long
    6.  
    7. Private Declare Function SetWindowRgn Lib "user32" _
    8. (ByVal hWnd As Long, ByVal hRgn As Long, _
    9. ByVal bRedraw As Boolean) As Long
    10.  
    11. Private Sub Form_Load()
    12. 'Show The form!
    13. SetWindowRgn hWnd, CreateEllipticRgn(0, 0, 300, 200), True
    14. End Sub

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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
  •  



Click Here to Expand Forum to Full Width