|
-
Apr 2nd, 2001, 06:46 PM
#1
Thread Starter
Addicted Member
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|