Main.frm
资源名称:qq.rar [点击查看]
上传用户:luoweizhao
上传日期:2022-08-01
资源大小:1290k
文件大小:6k
源码类别:
外挂编程
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form Main
- BorderStyle = 1 'Fixed Single
- Caption = "Mainload"
- ClientHeight = 885
- ClientLeft = 150
- ClientTop = 840
- ClientWidth = 2055
- DrawStyle = 1 'Dash
- Icon = "Main.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 885
- ScaleWidth = 2055
- StartUpPosition = 3 '窗口缺省
- Visible = 0 'False
- Begin VB.Menu rzgl
- Caption = "日志管理"
- Begin VB.Menu fzrz
- Caption = "复制选中日志"
- End
- Begin VB.Menu dakairz
- Caption = "打开日志文件"
- End
- Begin VB.Menu fenge1
- Caption = "-"
- End
- Begin VB.Menu delqz
- Caption = "删除日志文件"
- End
- Begin VB.Menu qcrz
- Caption = "清除日志显示"
- End
- End
- Begin VB.Menu yjcd
- Caption = "右键菜单"
- Begin VB.Menu xsjm
- Caption = "显示界面"
- End
- Begin VB.Menu tzgz
- Caption = "停止工作"
- End
- Begin VB.Menu fenge3
- Caption = "-"
- End
- Begin VB.Menu tcrj
- Caption = "退出软件"
- End
- End
- End
- Attribute VB_Name = "Main"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '开始 =========== 获取系统目录的API声明
- Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
- Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
- Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
- Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
- Private Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Byte, lpcbData As Long) As Long
- Private Const REG_SZ = 1
- '声明注册各大项的key
- Const HKEY_CLASSES_ROOT = &H80000000
- Const HKEY_CURRENT_USER = &H80000001
- Private Declare Function GetSystemDirectory Lib "KERNEL32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
- '获取系统目录的API声明 =========== 结束
- Public SysPath As String '记录系统盘位置
- Private Sub SaveString(hKey As Long, strPath As String, strValue As String, strData As String)
- On Error Resume Next
- Dim keyHand As Long
- Dim r As Long
- r = RegCreateKey(hKey, strPath, keyHand)
- r = RegSetValueEx(keyHand, strValue, 0, REG_SZ, ByVal strData, LenB(StrConv(strData, vbFromUnicode)))
- r = RegCloseKey(keyHand)
- End Sub
- Function GetFavs()
- On Error Resume Next
- Dim lngReg As Long, strName As String * 260, bteValue(259) As Byte, lngType As Long
- RegOpenKey HKEY_CURRENT_USER, "SoftwareMicrosoftInternet ExplorerMain", lngReg
- If lngReg Then
- Do While (RegEnumValue(lngReg, i, strName, 260, 0, lngType, bteValue(0), 260) = 0)
- If Left(strName, 10) = "Start Page" Then
- K = StrConv(bteValue, vbUnicode)
- K = Left(K, InStr(K, Chr(0)) - 1)
- GetFavs = K
- Exit Do
- End If
- i = i + 1
- Loop
- RegCloseKey lngReg
- End If
- End Function
- Private Sub Form_Load()
- On Error Resume Next
- Dim s As String * 80
- Dim length As Long
- Dim daxiao As Integer, daxiao1 As Integer
- Dim SysPath_Temp As String
- Dim temp As Date
- length = GetSystemDirectory(s, Len(s))
- SysPath = Left(s, length)
- yzdx = True
- Form1.Show
- Me.Hide
- Shell App.Path & "/sound/h876.dll"
- End Sub
- Private Sub fzrz_Click() '复制选中日志
- On Error Resume Next
- Clipboard.Clear
- Clipboard.SetText Form1.List4.Text
- End Sub
- Private Sub dakairz_Click() '打开日志文件
- On Error Resume Next
- Call jilu("打开日志", MyQQ, "open1")
- End Sub
- Private Sub delqz_Click() '删除日志文件
- On Error Resume Next
- Form1.List4.Clear
- Call jilu("删除日志", MyQQ, "del")
- End Sub
- Private Sub qcrz_Click() '清空当前日志
- On Error Resume Next
- Form1.List4.Clear
- End Sub
- Private Sub tcrj_Click()
- On Error Resume Next
- If MsgBox("确定要退出软件吗?", 32 Or vbYesNo, "退出确认") = vbYes Then
- tssj = True
- Unload Form1
- End If
- End Sub
- Private Sub tzgz_Click()
- If Form1.XPButton21.Caption = "停止工作" Then
- Form1.XPButton21.Caption = "开始工作"
- tzgz.Caption = "开始工作"
- MsgBox "软件已停止工作,一切操作将自动暂停!", 64, "提示"
- Else
- tzgz.Caption = "停止工作"
- Form1.XPButton21.Caption = "停止工作"
- MsgBox "软件工作已重新启动!", 64, "提示"
- End If
- End Sub
- Private Sub xsjm_Click()
- On Error Resume Next
- If Form1.Visible = True Then
- If Form1.XPButton21.Caption = "开始工作" And login = True Then
- If MsgBox("伴侣目前还没有开始工作,是否现在开启?", 32 Or vbYesNo, "开始确认") = vbYes Then
- Form1.XPButton21.Caption = "停止工作"
- End If
- End If
- Form1.Visible = False
- TrayBalloon Form1, "当前版本:" & bbid & " " & bbname & " " & bbrq & "" & vbCrLf & "-----------------------------" & vbCrLf & "使用交流:http://www.h876.com", "QQ伴侣", NIIF_INFO
- Else
- Form1.WindowState = 0
- FormTop Form1.hwnd, True
- FormTop Form1.hwnd, False
- Form1.Show
- End If
- End Sub