Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: print text on desktop
Option Explicit
Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd 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
Sub Command1_Click()
Dim str As String
str = "Here is some text on screen!"
TextOut GetWindowDC(0), 0, 0, str, Len(str)
End Sub |
Of course, if desktop is refreshed, or your text is covered with some other application, the text will be lost.
____________________________
If you find the answer helpful, please mark this topic as solved.
|