📄 objetc.frm
字号:
VERSION 5.00
Begin VB.Form Object_frm
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Caption = "Form2"
ClientHeight = 285
ClientLeft = -1005
ClientTop = 0
ClientWidth = 285
ControlBox = 0 'False
KeyPreview = -1 'True
LinkTopic = "Form3"
ScaleHeight = 19
ScaleMode = 3 'Pixel
ScaleWidth = 19
ShowInTaskbar = 0 'False
Begin VB.Image Image1
Enabled = 0 'False
Height = 330
Left = 0
Stretch = -1 'True
Top = 0
Width = 210
End
End
Attribute VB_Name = "Object_frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Trajectory() As POINTAPI
Private Data() As Byte
Public Color As Integer
Public Step_Amount As Integer
Public Actual_Step As Integer
Public Active As Boolean
Public Sub Make_Transparent()
Dim Ret As Long
Ret = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hwnd, GWL_EXSTYLE, Ret
SetLayeredWindowAttributes Me.hwnd, vbWhite, 255, LWA_COLORKEY Or LWA_ALPHA
End Sub
Public Sub Read_Trajectory(X As Integer)
Dim I As Integer
Data = LoadResData(100 + X, "CUSTOM")
Step_Amount = (UBound(Data)) \ 4 - 1
ReDim Trajectory(Step_Amount) As POINTAPI
For I = 0 To Step_Amount
Trajectory(I).X = Data(I * 4 + 0) + Data(I * 4 + 1) * 256
Trajectory(I).y = Data(I * 4 + 2) + Data(I * 4 + 3) * 256
Next I
Active = True
End Sub
Public Sub Run()
Actual_Step = Actual_Step + Direction
If Actual_Step > Step_Amount - 1 Or Actual_Step = -1 Then
Active = False
Exit Sub
End If
DoEvents
With Trajectory(Actual_Step)
Move .X, .y
End With
End Sub
Private Sub Form_Resize()
Image1.Move 0, 0, ScaleWidth - 5, ScaleHeight - 5
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -