📄 用容器移动控件.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5130
ClientLeft = 60
ClientTop = 345
ClientWidth = 6060
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 5130
ScaleWidth = 6060
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "Yes"
Height = 375
Left = 3540
TabIndex = 6
Top = 3060
Width = 1455
End
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 615
Index = 3
Left = 540
ScaleHeight = 615
ScaleWidth = 1515
TabIndex = 4
Top = 4140
Width = 1515
End
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 615
Index = 2
Left = 540
ScaleHeight = 615
ScaleWidth = 1515
TabIndex = 3
Top = 3000
Width = 1515
End
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 615
Index = 1
Left = 3420
ScaleHeight = 615
ScaleWidth = 1515
TabIndex = 2
Top = 1800
Width = 1515
End
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 615
Index = 0
Left = 540
ScaleHeight = 615
ScaleWidth = 1515
TabIndex = 1
Top = 1800
Width = 1515
Begin VB.CommandButton Command1
Caption = "No"
Height = 375
Left = 120
TabIndex = 5
Top = 120
Width = 1215
End
End
Begin VB.Label Label1
Caption = "Do you love me?"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1493
TabIndex = 0
Top = 660
Width = 3075
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static W As Integer
If W = 3 Then W = -1
W = W + 1
Select Case W
Case 0
Call SetParent(Command1.hWnd, Picture1(1).hWnd)
Case 1
Call SetParent(Command1.hWnd, Picture1(2).hWnd)
Case 2
Call SetParent(Command1.hWnd, Picture1(3).hWnd)
Case 3
Call SetParent(Command1.hWnd, Picture1(0).hWnd)
End Select
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -