CrAzY hOuSe
Locos por la programación
Crear un formulario con forma Elíptica.
.net

Syndication

Este ejemplo crea un formulario de forma Elíptica, pero cambiando la función CreateEllipticRgn por cualquier otra que pueda devolver un Rango, la puedes hacer de múltiples formas.

Copia este código en un formulario, ejecuta y pulsa sobre el formulario.

Option Explicit
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _
                ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
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 Sub Form_Click()
    Dim Xs As Long, Ys As Long
    Xs = Me.Width / Screen.TwipsPerPixelX
    Ys = Me.Height / Screen.TwipsPerPixelY
    SetWindowRgn hWnd, CreateEllipticRgn(0, 0, Xs, Ys), True
End Sub

Posted mié, jul 19 2000 19:50 by Maverick
Filed under: ,

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?
MavericK
Powered by Community Server (Non-Commercial Edition), by Telligent Systems