Помогите запустить следующую программу, находясь в документе Word. Заранее благодарю.
Код:
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 SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub Form_Load()
Const TEXT = "Привет, я текст!"
Dim hRgn As Long
Font.Name = "Times New Roman"
Font.Bold = True
Font.Size = 70
Width = TextWidth(TEXT)
Height = TextHeight(TEXT)
BeginPath hdc
Print TEXT
EndPath hdc
hRgn = PathToRegion(hdc)
SetWindowRgn hWnd, hRgn, False
Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
End Sub