borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Printing API polygones)Next Topic (Raising Events - attaching) New Topic New Poll Post Reply
AndreaVB Forum : API : print text on desktop
Poster Message
hr_rezaee
Level: Guest


icon print text on desktop

hi
i want print text on desktop
anyone can help me
thank u
hamidreza rezaee
email: hamidreza_rezaee@yhaoo.com  

21-09-2004 at 06:44 PM
| Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon 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.

22-09-2004 at 09:42 AM
View Profile Send Email to User Show All Posts | Quote Reply
hr_rezaee
Level: Guest

icon Re: print text on desktop

hi
thank u.
but i want function that has this properties:
transparent;font;color;font size

and i want be able to clear it .
pleaes guide me.
hamidreza rezaee  

26-09-2004 at 09:24 AM
| Quote Reply
AndreaVB Forum : API : print text on desktop
Previous Topic (Printing API polygones)Next Topic (Raising Events - attaching) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder