|
-
Jul 11th, 2001, 07:08 PM
#1
Thread Starter
Member
Textout
i did this code and it worked fine when i used a forms hwnd but when i try and write on the desktop it doesnt work pls help
------------------code------------------------------------------------------
Private Declare Function TextOut Lib "gdi32.dll" 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 GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
Dim retval As Long
Dim i As Long
Dim DesktopHwnd As Long
DesktopHwnd = GetDesktopWindow()
i = GetDC(DesktopHwnd)
retval = TextOut(i, 100, 50, "Hello, world!", 13)
End Sub
----------------------------------end of code---------------------------
What is Life? One big dream or one Big nightmere.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|