Results 1 to 3 of 3

Thread: How to check the edge of button

  1. #1

    Thread Starter
    Hyperactive Member csar's Avatar
    Join Date
    Mar 2002
    Location
    Siam
    Posts
    288

    How to check the edge of button

    Hi all,

    Could anyone create non-rectangular button, and how to check thier edge (like window media player interface) ?!?

    any idea/solution please

    Thank very much....
    Don't leave it till tomorrow, Do It Now!
    5361726176757468204368616E63686F747361746869656E

  2. #2
    Megatron
    Guest
    Here's an example of a non-rectangular button
    VB Code:
    1. Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    2. Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
    3.  
    4. Private Sub Command1_Click()
    5.     MsgBox "You pressed the button"
    6. End Sub
    7.  
    8. Private Sub Form_Load()
    9.     hRgn = CreateEllipticRgn(10, 10, 80, 80)
    10.     Call SetWindowRgn(Command1.hWnd, hRgn, True)
    11. End Sub

  3. #3

    Thread Starter
    Hyperactive Member csar's Avatar
    Join Date
    Mar 2002
    Location
    Siam
    Posts
    288
    Thank you
    Don't leave it till tomorrow, Do It Now!
    5361726176757468204368616E63686F747361746869656E

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