📄 frmtiles.frm
字号:
VERSION 5.00
Begin VB.Form frmTiles
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "Tile Set"
ClientHeight = 7200
ClientLeft = 45
ClientTop = 330
ClientWidth = 9600
ForeColor = &H000000FF&
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 480
ScaleMode = 3 'Pixel
ScaleWidth = 640
End
Attribute VB_Name = "frmTiles"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
'Paint the form
Form_Paint
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
'Change the active tile when form is clicked
gintTileX = x \ TILE_WIDTH
gintTileY = y \ TILE_HEIGHT
frmInfo.UpdateInfo
'Repaint the form
Form_Paint
End Sub
Private Sub DrawBox()
Dim intX As Integer
Dim intY As Integer
'Draw a box
intX = gintTileX * TILE_WIDTH
intY = gintTileY * TILE_HEIGHT
MoveToEx Me.hdc, intX, intY, gudtPoint
LineTo Me.hdc, intX + TILE_WIDTH, intY
LineTo Me.hdc, intX + TILE_WIDTH, intY + TILE_HEIGHT
LineTo Me.hdc, intX, intY + TILE_HEIGHT
LineTo Me.hdc, intX, intY
End Sub
Private Sub Form_Paint()
'Clear the form
Me.Cls
'Display the bitmap
StretchDIBits Me.hdc, 0, 0, gBMPInfo.bmiHeader.biWidth, gBMPInfo.bmiHeader.biHeight, 0, 0, gBMPInfo.bmiHeader.biWidth, gBMPInfo.bmiHeader.biHeight, gBMPData(0), gBMPInfo, DIB_RGB_COLORS, vbSrcCopy
'Draw the box
DrawBox
End Sub
Private Sub Form_Unload(Cancel As Integer)
'Check for dirtiness before exiting
Cancel = ExitProgram()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -