📄 formdll.frm
字号:
VERSION 5.00
Begin VB.Form FormDll1
Caption = "调用DLL中图片或函数"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 840
TabIndex = 1
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "调用DLL中函数"
Height = 375
Left = 2280
TabIndex = 0
Top = 2520
Width = 1815
End
Begin VB.Image ImageBmp
Height = 855
Index = 3
Left = 240
Top = 240
Width = 1815
End
Begin VB.Image ImageBmp
Height = 855
Index = 2
Left = 240
Top = 1320
Width = 1815
End
Begin VB.Image ImageBmp
Height = 855
Index = 1
Left = 2400
Top = 240
Width = 1815
End
Begin VB.Image ImageBmp
Height = 855
Index = 0
Left = 2400
Top = 1320
Width = 1815
End
End
Attribute VB_Name = "FormDll1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mIndex As Long
Private Sub Command1_Click()
Dim Obj As Object
Set Obj = CreateObject("ClassPh.Class1")
MsgBox Obj.Sum(2, 3)
Set Obj = Nothing
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ImageBmp(mIndex).Picture = LoadPicture()
End Sub
Private Sub ImageBmp_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim pH As Long
Dim Obj As Object
Set Obj = CreateObject("ClassPh.Class1")
If Index <> -1 Then ImageBmp(Index).Picture = LoadPicture()
Select Case Index
Case 0
pH = 201
Case 1
pH = 202
Case 2
pH = 203
Case 3
pH = 204
End Select
ImageBmp(Index).Picture = Obj.BmpNb(pH, 0)
Set Obj = Nothing
mIndex = Index
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -