Results 1 to 2 of 2

Thread: How come this only works with your own program's handle:

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    64
    how come when i do this it works:



    outline = CreateEllipticRgn(0, 0, 137, 157)
    SetWindowRgn form1.hwnd, outline, True
    DeleteObject outline

    but if i use findwindow and pass a different windows handle it doesn't?


  2. #2
    New Member
    Join Date
    Jun 2000
    Posts
    4

    Wink

    if you put your sub in a module then call it from whatever form you want to change it works fine.

    Public Sub Ellipse(hWnd As Long)
    outline = CreateEllipticRgn(0, 0, 137, 157)
    SetWindowRgn hWnd, outline, True
    DeleteObject outline
    End Sub

    just call it from your form
    Call Ellipse(Me.hWnd)

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