Hi Friends
only My application can run and others application user can not access.I need to lock the User Desktop ..
Windows plateform is XP...
Printable View
Hi Friends
only My application can run and others application user can not access.I need to lock the User Desktop ..
Windows plateform is XP...
you want to run your program first, and then shutdown the system? you have to keep the form from being closed, you have to inhibit ctrl-alt-del, you have to disable the start menu.
You could set policies to do a few of those things.
Look here for some hints that you don't have to program.
Lock the User Desktop Only My application Runs .... is it possible then help me..............
i m using winxp 800*600
Isn't there a registry key that'll do that? Goto www.regedit.com
I'm pretty sure there is one. Also, do you know how to add registry keys using VB? If you don't, here's how:
VB Code:
Private Function Registry_Read(Key_Path, Key_Name) As Variant On Error Resume Next Dim Registry As Object Set Registry = CreateObject("WScript.Shell") Registry_Read = Registry.RegRead(Key_Path & Key_Name) End Function Private Sub Registry_Write(Key_Path As String, Key_Name As String, Key_Value As Variant, Optional Key_Type As String) On Error Resume Next 'Key Type list (Use within string, ex. " ' REG_DWORD") '---------------- 'REG_BINARY - This type stores the value ' as raw binary data. Most hardware compon ' ent information is stored as binary data ' , and can be displayed in an editor in h ' exadecimal format. 'REG_DWORD - This type represents the da ' ta by a four byte number and is commonly ' used for boolean values, such as "0" is ' disabled and "1" is enabled. Additionall ' y many parameters for device driver and ' services are this type, and can be displ ' ayed in REGEDT32 in binary, hexadecimal ' and decimal format, or in REGEDIT in hex ' adecimal and decimal format. 'REG_EXPAND_SZ - This type is an expanda ' ble data string that is string containin ' g a variable to be replaced when called ' by an application. For example, for the ' following value, the string "%SystemRoot ' %" will replaced by the actual location ' of the directory containing the Windows ' NT system files. (This type is only avai ' lable using an advanced registry editor ' such as REGEDT32) 'REG_MULTI_SZ - This type is a multiple ' string used to represent values that con ' tain lists or multiple values, each entr ' y is separated by a NULL character. (Thi ' s type is only available using an advanc ' ed registry editor such as REGEDT32) 'REG_SZ - This type is a standard string ' , used to represent human readable text ' values. 'Other data types not available through ' the standard registry editors include: 'REG_DWORD_LITTLE_ENDIAN - A 32-bit numb ' er in little-endian format. 'REG_DWORD_BIG_ENDIAN - A 32-bit number ' in big-endian format. 'REG_LINK - A Unicode symbolic link. Use ' d internally; applications should not us ' e this type. 'REG_NONE - No defined value type. 'REG_QWORD - A 64-bit number. 'REG_QWORD_LITTLE_ENDIAN - A 64-bit numb ' er in little-endian format. 'REG_RESOURCE_LIST - A device-driver res ' ource list. Dim Registry As Object Dim Registry_Value As Variant Set Registry = CreateObject("WScript.Shell") Registry_Value = Registry_Read(Key_Path, Key_Name) If Key_Type = "" Then 'REG_SZ is the default. Registry.RegWrite Key_Path & Key_Name, Key_Value Else Registry.RegWrite Key_Path & Key_Name, Key_Value, Key_Type End If End Sub Private Sub Form_Activate() 'This is only an example of a registry e ' ntry. Registry_Write "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\", "Test", 1, "REG_DWORD" End Sub