Could try something like ths, just change strText to be your message. x and y are the screen coords in pixels.
put this in the declares section of your form
Code:
Private Declare Function CreateFontIndirect Lib "gdi32" Alias _
"CreateFontIndirectA" (lpLogFont As logFont) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc _
As Long, ByVal hobject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal _
hobject As Long) As Long
Private Const LF_FACESIZE = 32
Private Type logFont
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName As String * LF_FACESIZE
End Type
Private myLogfont As logFont
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
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 Const TRANSPARENT = 1
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
put this code in a Command button or something
Code:
Dim prevFont As Long
Dim ret As Long
Dim strText As String
Dim hfont As Long
Dim hdc As Long
Dim x As Long
Dim y As Long
x = 100
y = 100
strText = "Example String"
' First get the Desktop DC:
hdc = CreateDCAsNull("DISPLAY", ByVal 0&, ByVal 0&, ByVal 0&)
'Create an indirect font to use on the Desktop
myLogfont.lfEscapement = 0
myLogfont.lfFaceName = "Arial" & Chr$(0) 'Null character at end
myLogfont.lfHeight = 0
myLogfont.lfWidth = 14
myLogfont.lfCharSet = 0
myLogfont.lfQuality = 255
myLogfont.lfClipPrecision = 255
myLogfont.lfOutPrecision = 255
myLogfont.lfWeight = 255
' Create the font
hfont = CreateFontIndirect(myLogfont)
' make the hDC use this created font
prevFont = SelectObject(hdc, hfont)
' Sets transparent mode (1). (0) is opaque
ret = SetBkMode(hdc, TRANSPARENT)
' This Actually outputs the text
ret = TextOut(hdc, x, y, strText, Len(strText))
' Get the prevoius selected font
ret = SelectObject(hdc, prevFont)
' and delete our font
ret = DeleteObject(hfont)
' Make sure you do this to release the GDI
' resource:
DeleteDC hdc