|
|
|
|
|
Dicas
|
|
Visual Basic (Forms/MDI)
|
|
|
Título da Dica: Criando um Form em forma de Triângulo
|
|
|
|
Postada em 14/8/2000 por Webmaster
webmaster@vbweb.com.br
'Coloque este código num Form: Option Explicit Private Type POINTAPI x As Long y As Long End Type
Private Type tP P(1 To 3) As POINTAPI End Type
Private Declare Function CreatePolygonRgn Lib _ "gdi32" (lpPoint As POINTAPI, ByVal _ nCount As Long, ByVal nPolyFillMode _ As Long) As Long Private Declare Function SetWindowRgn Lib _ "user32" (ByVal hWnd As Long, ByVal _ hRgn As Long, ByVal bRedraw As Boolean) _ As Long
Private Sub Form_Load() Dim z As tP Me.ScaleMode = vbPixels z.P(1).x = ((Me.ScaleHeight - Me.ScaleLeft) / _ 2) + 13 z.P(1).y = 26 z.P(2).x = 26 z.P(2).y = Me.ScaleHeight - Me.ScaleLeft z.P(3).x = Me.ScaleHeight - Me.ScaleLeft z.P(3).y = Me.ScaleHeight - Me.ScaleLeft SetWindowRgn hWnd, CreatePolygonRgn(z.P(1), _ 3, 3), True End Sub
|
|
|
|
|