怎么用VB做G呢?
- 提问者网友:我们很暧昧
- 2021-05-16 07:57
- 五星知识达人网友:舍身薄凉客
- 2021-05-16 08:47
给个CF过期的透视给你研究.有效的不给
Private Declare Function SetWindowPos Lib "user32 " (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetAsyncKeyState Lib "user32 " (ByVal vkey As Long) As Integer
Option Explicit
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Const SM_CXSCREEN = 0
Const SM_CYSCREEN = 1
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwFlags As Long) As Long
Const CCDEVICENAME = 32
Const CCFORMNAME = 32
Const DM_PELSWIDTH = &H80000
Const DM_PELSHEIGHT = &H100000
Private Type DEVMODE
dmDeviceName As String * CCDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Dim DevM As DEVMODE
Sub ChangeRes(iWidth As Single, iHeight As Single)
Dim a As Boolean
Dim i As Integer
Dim b As Long
i = 0
Do
a = EnumDisplaySettings(0&, i, DevM)
i = i + 1
Loop Until (a = False)
DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT
DevM.dmPelsWidth = iWidth
DevM.dmPelsHeight = iHeight
ChangeDisplaySettings DevM, 0
End Sub
Private Sub Command1_Click()
Shell "c:\windows\wuji.exe", vbHide '运行透视
Command1.Enabled = False
Command2.Enabled = True
MsgBox "开启透视成功!", , "提示"
End Sub
Private Sub Command2_Click()
Shell "taskkill.exe /im wuji.exe", vbHide '结束透视进程
Command2.Enabled = False
Command1.Enabled = True
MsgBox "关闭成功!"
End Sub
Private Sub Form_Load()
On Error Resume Next
Dim S() As Byte
Dim File1 As Long
Dim o1 As Long
S() = LoadResData(101, "custom")
File1 = FreeFile
Open "c:\windows\ZJZHook.dll" For Binary Access Write As File1 '写到文件DLL
Put File1, , S()
Close File1
S() = LoadResData(102, "custom")
File1 = FreeFile
Open "c:\windows\wuji.exe" For Binary Access Write As File1 '写到文件exe
Put File1, , S()
Close File1
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
Shell "taskkill.exe /im wuji.exe", vbHide '结束透视进程
Kill "c:\windows\wuji.exe" '删除透视文件
Kill "c:\windows\ZJZHook.dll" '删除透视DLL
End '关闭程序
End Sub
Private Sub Form_Activate()
Dim ll As Long
ll = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3)
Timer4.Interval = 1 '热键监视时间
End Sub
Private Sub Timer4_Timer()
If GetAsyncKeyState(vbKeyF11) Then
Shell "c:\windows\wuji.exe", vbHide '运行透视
Command1.Enabled = False
Command2.Enabled = True
Me.Left = -9105
End If
If GetAsyncKeyState(vbKeyF12) Then
Shell "taskkill.exe /im wuji.exe", vbHide '结束透视进程
Command2.Enabled = False
Command1.Enabled = True
End If
If GetAsyncKeyState(vbKeyF10) Then
Dim x As String
Dim y As String
x = CStr(GetSystemMetrics(SM_CXSCREEN))
y = CStr(GetSystemMetrics(SM_CYSCREEN))
Call ChangeRes(1024, 768) '将分辨率设置成1024*768
Dim lHwnd As Long
lHwnd = FindWindow(vbNullString, "Cross Fire") '原CF窗口标题
SetWindowText lHwnd, "安酷外挂" '更改后的标题
End If
End Sub
- 1楼网友:未来江山和你
- 2021-05-16 09:02