Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Hide Desktop Icons & Windows Taskbar?

Status
Not open for further replies.

coolphilboy

Technical User
Aug 19, 2001
19
0
0
PH
Could someone please help me how to hide the desktop icons & windows taskbar while the my program is still running?

TIA
 
This will hide the desktop icons and taskbar and then (under Win9x) prevent the user from accessing the start menu.
Place two command buttons on a form and include this code. Click the first button to hide and the second button to restore....[tt]

Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32.dll" _
(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 Sub Command1_Click()
[/tt]'Hide the icons...[tt]
ShowWindow FindWindow("progman", vbNullString), 0
[/tt]'Hide the taskbar...[tt]
ShowWindow FindWindow("Shell_TrayWnd", vbNullString), 0
[/tt]'Disable the system keys...[tt]
tmp& = SystemParametersInfo(97&, 1&, 0&, 0&)
End Sub

Private Sub Command2_Click()
[/tt]'Show the icons...[tt]
ShowWindow FindWindow("progman", vbNullString), 1
[/tt]'Show the taskbar...[tt]
ShowWindow FindWindow("Shell_TrayWnd", vbNullString), 1
[/tt]'Enable the system keys...[tt]
tmp& = SystemParametersInfo(97&, 0&, 0&, 0&)
End Sub
[/tt]
Note that none of this is very friendly to the user. I hope you have a good reason for prohibiting the basic Windows interface. An application crash could require a reboot and might serve as notice that your program isn't worth much.

VCA.gif
 
I disable the start menu, taskbar etc in ALL
of the apps i do for my 3 year old son
he likes to delete things and copy icons. If
you have never has 25 recycle bins on your desktop
you aint lived hehe
Dragnut
 
Yes. Research has shown that users are responsible for 95% of all IT-related headaches. Application bugs (including unfinished OSes), hardware issues and "Acts of God" comprise the remaining 5%.

In some cases, there may be a valid argument for limiting the scope of the user interface. Just remember, please, that most users believe their level of skill is adequately advanced to allow unbridled experimentation in the Control Panel and periodic "clean ups" of files in the system folders. If a job title accompanies such advanced skills, our only course is to enhance the computing experience (not restrict it).
VCA.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top