Суть идеи смотреть кино играя в игрушку.
вот нарыл пример с текстом но он тоже не работает корректно...
- Код: Выделить всё
Private Declare Function CreateDCAsNull Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, lpDeviceName As Any, lpOutput As Any, lpInitData As Any) As Long
Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function GetTextColor Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Public Sub TestDesktopDC(TextA As String)
Dim hdc As Long
Dim tR As RECT
Dim lCol As Long
hdc = CreateDCAsNull("DISPLAY", ByVal 0&, ByVal 0&, ByVal 0&)
tR.Left = 0
tR.Top = 0
tR.Right = 1740
tR.Bottom = 1320
lCol = GetTextColor(hdc)
SetTextColor hdc, &HFF&
DrawText hdc, TextA, Len(TextA), tR, 8
SetTextColor hdc, lCol
DeleteDC hdc
End Sub
Private Sub Command1_Click()
Dim werA As String
werA = InputBox("Введите строку!", "Output on Display")
TestDesktopDC werA
End Sub
За пример взял игрушку Diablo 2.