Option Explicit
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
Const sText = "Текст"
Picture1.BackColor = vbBlack
Picture1.BorderStyle = 0
Me.FontName = "Arial"
Me.FontSize = 14
BeginPath Me.hdc
TextOut Me.hdc, 0, 0, sText, Len(sText)
EndPath Me.hdc
hRgn = PathToRegion(Me.hdc)
SetWindowRgn Picture1.hWnd, hRgn, True
DeleteObject hRgn
End Sub
keks-n писал(а):Роль лейбла играет пикчербокс, который имеет окно.
tyomitch писал(а):dr.MIG, ты не просёк фишку.
Сейчас этот форум просматривают: SemrushBot и гости: 96