-
I am making a program that limits the useage of a computer. It will disable certain icons, and functions, stop DOS programs from being run etc. Prevent access to key files such as win.ini, autoexec.bat, etc. I am trying to create a new start button, that will display only certain options. I have made a button that looks identical to the start menu, it is Command1. I am using SetParent to put the start button in place, once it is put into place, my program freezes and so does the new start button.
Code:
Option Explicit
Private Declare Function FindWindow& Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String)
Private Declare Function SetParent& Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long)
Private Sub Form_Load()
Dim a&
Dim b&
a& = FindWindow("Shell_TrayWnd", vbNullString)
Call SetParent(Command1.hwnd, a&)
Command1.Left = 0
Command1.Top = 1
End Sub
Can anyone help me with this?
-
is this going to be a program that they have to run? If so, then why don't you make your program the shell instead of explorer.exe. No funny parent setting then (a good way to crash explorer, by the way).
Instead of trying to disable certain things, you just never add them to start with.