1.发现explorer.exe(仅为举例)在运行,a=1
2.格式化d盘
3.进程保护,如360用进程管理器关不掉
4.关闭所有程序只留下本程序和用户开机时会运行的所有程序
5.数独计算器修改:(label×3,text1(0-80))
Public XX, AA, BB, DD, EE As Byte'用于计算
Public CC As Boolean'用于计算
Private SDA(1 To 81), SDC(1 To 81) As Boolean'记录是否有数,记录数的可能性
Private SDB(1 To 81) As Byte'记录数据Private Sub Form_Load()
Label2_Click
End SubPrivate Sub Label1_Click()
For XX = 1 To 81
If Val(Text1(XX - 1)) <> 0 Then
SDA(XX) = True
SDB(XX) = Val(Text1(XX - 1))
Else
SDA(XX) = False
SDB(XX) = 0
End If
Next XX
For XX = 1 To 81
EE = 0
DD = 45
For AA = 1 To 9
For BB = 1 To 9
If SDA(XX) = False Then
If SDB(((XX - 1) \ 9) * 9 + BB) = AA Or SDB(9 * (BB - 1) + (XX - 1) Mod 9 + 1) = AA Or _
SDB(((XX - 1) \ 27) * 27 + (((XX - 1) Mod 9) \ 3) * 3 + (BB - 1) Mod 3 + ((BB - 1) \ 3) * 9 + 1) = AA Then
DD = DD - AA
EE = EE + 1
BB = 9
End If
End If
Next BB
Next AA
If EE = 8 Then
Text1(XX - 1) = DD
SDA(XX) = True
SDB(XX) = DD
XX = 0
End If
Next XX
End SubPrivate Sub Label2_Click()
For XX = 0 To 80
Text1(XX) = ""
SDA(XX + 1) = False
SDB(XX + 1) = 0
Next XX
End SubPrivate Sub Label3_Click()
For XX = 1 To 81
If Val(Text1(XX - 1)) <> 0 Then
SDA(XX) = True
SDB(XX) = Val(Text1(XX - 1))
Else
SDA(XX) = False
SDB(XX) = 0
End If
Next XX
For AA = 1 To 9
For XX = 1 To 81
SDC(XX) = True
Next XX
For XX = 1 To 81
If SDB(XX) = AA Then
For BB = 1 To 9
SDC(((XX - 1) \ 9) * 9 + BB) = False
SDC(9 * (BB - 1) + (XX - 1) Mod 9 + 1) = False
SDC(((XX - 1) \ 27) * 27 + (((XX - 1) Mod 9) \ 3) * 3 + (BB - 1) Mod 3 + ((BB - 1) \ 3) * 9 + 1) = False
Next BB
End If
If XX = 81 Then
For BB = 1 To 73 Step 9
EE = 0
For DD = 0 To 9
If SDC(BB + DD) = True And SDB(BB + DD) = 0 Then
If EE <> 0 Then
DD = 9
EE = 0
Else
EE = BB + DD
End If
End If
If DD = 8 And EE <> 0 Then
SDB(EE) = AA
SDA(EE) = True
Text1(EE - 1) = AA
EE = 0
DD = 9
ElseIf DD = 8 And EE = 0 Then
DD = 9
End If
Next DD
Next BB
For DD = 0 To 8
EE = 0
For BB = 1 To 82 Step 9
If SDC(BB + DD) = True And SDB(BB + DD) = 0 Then
If EE <> 0 Then
BB = 82
EE = 0
Else
EE = BB + DD
End If
End If
If BB = 73 And EE <> 0 Then
SDB(EE) = AA
Text1(EE - 1) = AA
EE = 0
BB = 82
ElseIf BB = 73 And EE = 0 Then
BB = 82
End If
Next BB
Next DD
For BB = 1 To 9
EE = 0
For DD = 1 To 10
If SDC(((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1) = True And _
SDB(((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1) = 0 Then
If EE <> 0 Then
DD = 10
EE = 0
Else
EE = ((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1
End If
End If
If DD = 9 And EE <> 0 Then
Text1(EE - 1) = AA
EE = 0
DD = 10
ElseIf DD = 9 And EE = 0 Then
DD = 10
End If
Next DD
Next BB End If
Next XX
Next AA
End SubPrivate Sub Text1_Change(Index As Integer)
If Val(Text1(Index)) <> 0 And Index < 80 Then
Text1(Index + 1).SetFocus
ElseIf Val(Text1(Index)) = 0 And Index <= 80 Then
Text1(Index).Text = ""
End If
End SubPrivate Sub Text1_GotFocus(Index As Integer)
Text1(Index).SelStart = 0
Text1(Index).SelLength = 1
Text1(Index).SetFocusEnd SubPrivate Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyLeft And Index > 0 Then Text1(Index - 1).SetFocus
If KeyCode = vbKeyRight And Index < 80 Then Text1(Index + 1).SetFocus
If KeyCode = vbKeyUp And Index > 8 Then Text1(Index - 9).SetFocus
If KeyCode = vbKeyDown And Index < 72 Then Text1(Index + 9).SetFocus
If KeyCode = vbKeyBack And Text1(Index) = "" And Index > 0 Then Text1(Index - 1).SetFocus
If KeyCode = vbKeySpace And Text1(Index) = "" And Index < 80 Then Text1(Index + 1).SetFocus
If KeyCode = vbKeyReturn Then Label1_Click
End Sub
2.格式化d盘
3.进程保护,如360用进程管理器关不掉
4.关闭所有程序只留下本程序和用户开机时会运行的所有程序
5.数独计算器修改:(label×3,text1(0-80))
Public XX, AA, BB, DD, EE As Byte'用于计算
Public CC As Boolean'用于计算
Private SDA(1 To 81), SDC(1 To 81) As Boolean'记录是否有数,记录数的可能性
Private SDB(1 To 81) As Byte'记录数据Private Sub Form_Load()
Label2_Click
End SubPrivate Sub Label1_Click()
For XX = 1 To 81
If Val(Text1(XX - 1)) <> 0 Then
SDA(XX) = True
SDB(XX) = Val(Text1(XX - 1))
Else
SDA(XX) = False
SDB(XX) = 0
End If
Next XX
For XX = 1 To 81
EE = 0
DD = 45
For AA = 1 To 9
For BB = 1 To 9
If SDA(XX) = False Then
If SDB(((XX - 1) \ 9) * 9 + BB) = AA Or SDB(9 * (BB - 1) + (XX - 1) Mod 9 + 1) = AA Or _
SDB(((XX - 1) \ 27) * 27 + (((XX - 1) Mod 9) \ 3) * 3 + (BB - 1) Mod 3 + ((BB - 1) \ 3) * 9 + 1) = AA Then
DD = DD - AA
EE = EE + 1
BB = 9
End If
End If
Next BB
Next AA
If EE = 8 Then
Text1(XX - 1) = DD
SDA(XX) = True
SDB(XX) = DD
XX = 0
End If
Next XX
End SubPrivate Sub Label2_Click()
For XX = 0 To 80
Text1(XX) = ""
SDA(XX + 1) = False
SDB(XX + 1) = 0
Next XX
End SubPrivate Sub Label3_Click()
For XX = 1 To 81
If Val(Text1(XX - 1)) <> 0 Then
SDA(XX) = True
SDB(XX) = Val(Text1(XX - 1))
Else
SDA(XX) = False
SDB(XX) = 0
End If
Next XX
For AA = 1 To 9
For XX = 1 To 81
SDC(XX) = True
Next XX
For XX = 1 To 81
If SDB(XX) = AA Then
For BB = 1 To 9
SDC(((XX - 1) \ 9) * 9 + BB) = False
SDC(9 * (BB - 1) + (XX - 1) Mod 9 + 1) = False
SDC(((XX - 1) \ 27) * 27 + (((XX - 1) Mod 9) \ 3) * 3 + (BB - 1) Mod 3 + ((BB - 1) \ 3) * 9 + 1) = False
Next BB
End If
If XX = 81 Then
For BB = 1 To 73 Step 9
EE = 0
For DD = 0 To 9
If SDC(BB + DD) = True And SDB(BB + DD) = 0 Then
If EE <> 0 Then
DD = 9
EE = 0
Else
EE = BB + DD
End If
End If
If DD = 8 And EE <> 0 Then
SDB(EE) = AA
SDA(EE) = True
Text1(EE - 1) = AA
EE = 0
DD = 9
ElseIf DD = 8 And EE = 0 Then
DD = 9
End If
Next DD
Next BB
For DD = 0 To 8
EE = 0
For BB = 1 To 82 Step 9
If SDC(BB + DD) = True And SDB(BB + DD) = 0 Then
If EE <> 0 Then
BB = 82
EE = 0
Else
EE = BB + DD
End If
End If
If BB = 73 And EE <> 0 Then
SDB(EE) = AA
Text1(EE - 1) = AA
EE = 0
BB = 82
ElseIf BB = 73 And EE = 0 Then
BB = 82
End If
Next BB
Next DD
For BB = 1 To 9
EE = 0
For DD = 1 To 10
If SDC(((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1) = True And _
SDB(((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1) = 0 Then
If EE <> 0 Then
DD = 10
EE = 0
Else
EE = ((BB - 1) \ 3) * 27 + (BB - 1) Mod 3 + ((DD - 1) \ 3) * 9 + (DD - 1) Mod 3 + 1
End If
End If
If DD = 9 And EE <> 0 Then
Text1(EE - 1) = AA
EE = 0
DD = 10
ElseIf DD = 9 And EE = 0 Then
DD = 10
End If
Next DD
Next BB End If
Next XX
Next AA
End SubPrivate Sub Text1_Change(Index As Integer)
If Val(Text1(Index)) <> 0 And Index < 80 Then
Text1(Index + 1).SetFocus
ElseIf Val(Text1(Index)) = 0 And Index <= 80 Then
Text1(Index).Text = ""
End If
End SubPrivate Sub Text1_GotFocus(Index As Integer)
Text1(Index).SelStart = 0
Text1(Index).SelLength = 1
Text1(Index).SetFocusEnd SubPrivate Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyLeft And Index > 0 Then Text1(Index - 1).SetFocus
If KeyCode = vbKeyRight And Index < 80 Then Text1(Index + 1).SetFocus
If KeyCode = vbKeyUp And Index > 8 Then Text1(Index - 9).SetFocus
If KeyCode = vbKeyDown And Index < 72 Then Text1(Index + 9).SetFocus
If KeyCode = vbKeyBack And Text1(Index) = "" And Index > 0 Then Text1(Index - 1).SetFocus
If KeyCode = vbKeySpace And Text1(Index) = "" And Index < 80 Then Text1(Index + 1).SetFocus
If KeyCode = vbKeyReturn Then Label1_Click
End Sub
2.格式化d盘
3.进程保护,如360用进程管理器关不掉
4.关闭所有程序只留下本程序和用户开机时会运行的所有程序 多友好的东东啊。PS:
你写了半天一个问号都没写,也没说你的问题是啥。
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal dwFlags As Long, ByVal th32ProcessID As Long) As Long
Private Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSapshot As Long, lppe As PROCESSENTRY32) As Long
Private Type PROCESSENTRY32
dwSize As Long
cntUseage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
swFlags As Long
szExeFile As String * 1024
End Type
Private Const TH32CS_SNAPPROCESS = &H2Private Sub Form_Load()
Dim pe As PROCESSENTRY32
Dim a As Integer
Dim hSnpSht As Long, RetVal As Long
hSnpSht = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) '创建进程快照
If hSnpSht <> 0 Then
pe.dwSize = Len(pe)
RetVal = Process32First(hSnpSht, pe) '获取第一个进程信息
Do While RetVal <> 0
If InStr(pe.szExeFile, "explorer.exe") Then '查找explorer进程
a = 1
Exit Do
End If
RetVal = Process32Next(hSnpSht, pe) '获取下一个进程信息
Loop
End If
MsgBox a
End Sub
没办法只有平分一下哈