|
|
|
|
|
Dicas
|
|
Visual Basic (Forms/MDI)
|
|
|
Título da Dica: Criando um Form Circular
|
|
|
|
Postada em 14/8/2000 por Webmaster
webmaster@vbweb.com.br
'No Declarations do form: 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
'No Form_Load: Private Sub Form_Load() Dim hr&, dl& Dim usew&, useh& usew& = me.Width / Screen.TwipsPerPixelX useh& = me.Height / Screen.TwipsPerPixelY x = 0 'Deixa o Form ficar em forma círcular hr& = CreateEllipticRgn(0, 0, usew, useh) dl& = SetWindowRgn(me.hWnd, hr, True) End Sub
|
|
|
|
|