根据QQ昵称关机重启的VB源码

10次阅读
没有评论

某日,我在论坛看到有人在论坛发的根据QQ昵称远程关机的软件,其接口是http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins=你的QQ
然后,我就用VB写了个
源码,打包的程序在附件

部分代码:

Private Sub Form_Load()
Appdisk = Trim(App.Path)
If Right(Appdisk, 1) <> "\" Then Appdisk = Appdisk & "\"
Text1.Text = ReadIniFile(Appdisk & "\set.ini", "CONFIG", "WangZhi")
Text2.Text = ReadIniFile(Appdisk & "\set.ini", "CONFIG", "Wait")
Check1.Value = Val(ReadIniFile(Appdisk & "\set.ini", "CONFIG", "Check"))
If Check1.Value = 1 Then Me.Hide
Check1.Value = 1
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call INIWrite("CONFIG", "WangZhi", Text1.Text, Appdisk & "\set.ini") '提取源码的网址
Call INIWrite("CONFIG", "Wait", Text2.Text, Appdisk & "\set.ini") '等待的时间
Call INIWrite("CONFIG", "Check", Check1.Value, Appdisk & "\set.ini") '是否显示界面
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
KeyAscii = 8
Exit Sub
End If
If KeyAscii < 47 Or KeyAscii > 58 Then
KeyAscii = 0
Beep '声音
End If
End Sub

Private Sub Text2_LostFocus()
If Text2.Text = "" Then Text2.Text = "5"
End Sub

Private Sub Timer1_Timer()
Minute = Minute + 1
If Minute = Val(Text2.Text) Then
JiLu Time & "请求获取源码!"
Yuan = ReadinteFile("http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins=" & Text1.Text)
'If InStr(Yuan, "关机") Then QuitSystemWin 0
'If InStr(Yuan, "重启") Then QuitSystemWin 1
If InStr(Yuan, "关机") Then MsgBox "关机"
If InStr(Yuan, "重启") Then MsgBox "重启"
'请修改上面的代码实现功能
Minute = 0
End If
End Sub

Public Function ReadinteFile(ByVal sUrl As String) As String
Dim xmlHTTP1 As Object
Set xmlHTTP1 = CreateObject("Microsoft.XMLHTTP")
xmlHTTP1.Open "get", sUrl, True
xmlHTTP1.send
While xmlHTTP1.readyState <> 4
DoEvents
Wend
ReadinteFile = xmlHTTP1.responseText
Set xmlHTTP1 = Nothing
End Function

Private Sub JiLu(MakStr As String)
On Error Resume Next
Dim F As String, H As Long
F = Appdisk & "\运行记录.txt"
H = FreeFile
Open F For Append As #H
Print #H, MakStr
Close #H
End Sub

评分多了走屌丝通道。。。

有人说,看不懂是什么意思。
作用是:电脑上运行这个软件,首次打开输入你自己的QQ,然后设定个检测时间。
你可以通过手机QQ修改自己的QQ昵称实现控制电脑关机、重启。
比如:QQ 昵称为 关机,则电脑关机。
还有人不明白吗??

正文完
 0
116博客
版权声明:本篇文章由 116博客 于2025-01-02发表,共计1793字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码