VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Hide Your Desktop.

by Nimesh Patel (3 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th April 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Hide Your Desktop.

API Declarations


Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long

Private Const SPI_SCREENSAVERRUNNING = 97

____________________________________________________

Module :---


Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40
Declare Function ShowCursor& Lib "user32" (ByVal bShow As Long)

Rate Hide Your Desktop.



    Dim hWnd As Long
    hWnd = FindWindowEx(0&, 0&, "Progman", vbNullString)
    ShowWindow hWnd, 0
End Sub
Private Sub cmdDShow_Click()
    Dim hWnd As Long
    hWnd = FindWindowEx(0&, 0&, "Progman", vbNullString)
    ShowWindow hWnd, 5
End Sub
Private Sub cmdExit_Click()
    Me.Hide
    End
End Sub
Private Sub cmdHelp_Click()
    MsgBox "Email me at... [email protected] for help", , "Help"
End Sub

Download this snippet    Add to My Saved Code

Hide Your Desktop. Comments

No comments have been posted about Hide Your Desktop.. Why not be the first to post a comment about Hide Your Desktop..

Post your comment

Subject:
Message:
0/1000 characters