[request] Desktatic
danm look what i have found !!!
i do not have VB here but it is a code what can let you draw directily onto your desktop
Start a new project in VB. Add a new module.
Add this code to a Module:
Option Explicit
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()
Dim hdc As Long
Dim tR As RECT
Dim lCol As Long
' First get the Desktop DC:
hdc = CreateDCAsNull("DISPLAY", ByVal 0&, ByVal 0&, ByVal 0&)
' Draw text on it:
tR.Left = 0
tR.Top = 0
tR.Right = 640
tR.Bottom = 32
lCol = GetTextColor(hdc)
SetTextColor hdc, &HFF&
DrawText hdc, "vbAccelerator & Code Magician", Len("vbAccelerator _
& Code Magician"), tR, 0
SetTextColor hdc, lCol
' Make sure you do this to release the GDI
' resource:
DeleteDC hdc
End Sub
'-- End --'
To test the code, add a command button to the project's form, and place the following code in it's click event:
Private Sub Command1_Click()
TestDesktopDC
End Sub
'-- End --'
who is up to compile that to see if its works ?
Well at my school we have SMARTBoards, so I use the SMARTBoard Tools...hehe, it lets you draw, yep!
-Lou
i tried it and it didn't do anything for me?? it created what you see in the upper left corner of my desktop, that's it.
What you have there is a very simple GDI drawing program. You need to program a whole set of IO's to get it running like you want. Ie that is drawing with GDI what you draw with the mouse.
You think a program that simple would make what you want?
Yeah I was going to say something about that...
A few years ago was an app similar to desktatic. called WALLPAINT "think it was for free" but now i can`t find it !!!
and yeah i knew it /( that code was on the net and the one who wrote it said so.... anyway....)
Aqua-Soft Forums