Private Declare Function BeginPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function PathToRegion Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount 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 Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Sub Form_Load()
Dim hRgn As Long
Me.WindowState = 2
Me.FontName = "Arial"
Me.FontSize = 100
Me.BackColor = vbRed
BeginPath Me.hdc
TextOut Me.hdc, 0, 0, "I love you !", 12
EndPath Me.hdc
hRgn = PathToRegion(Me.hdc)
SetWindowRgn Me.hWnd, hRgn, True
DeleteObject hRgn
End Sub