📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "拖放"
ClientHeight = 1725
ClientLeft = 60
ClientTop = 345
ClientWidth = 3810
LinkTopic = "Form1"
ScaleHeight = 1725
ScaleWidth = 3810
StartUpPosition = 3 'Windows Default
Begin VB.ListBox List1
DragIcon = "Form1.frx":0000
Height = 1500
ItemData = "Form1.frx":0442
Left = 0
List = "Form1.frx":045B
TabIndex = 1
Top = 0
Width = 1770
End
Begin VB.ListBox List2
DragIcon = "Form1.frx":0497
Height = 1500
ItemData = "Form1.frx":08D9
Left = 1950
List = "Form1.frx":0901
TabIndex = 0
Top = 15
Width = 1740
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
List1.Tag = 1
List2.Tag = 2
Form2.Show
End Sub
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If List1.ListIndex >= 0 Then List1.Drag
End Sub
Private Sub List2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If List2.ListIndex >= 0 Then List2.Drag
End Sub
Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
If Source.Tag = 2 Then
Source.Drag 0
Else
List1.AddItem Source.List(Source.ListIndex)
Source.RemoveItem (Source.ListIndex)
End If
End Sub
Private Sub List2_DragDrop(Source As Control, X As Single, Y As Single)
If Source.Tag = 1 Then
Source.Drag 0
Else
List2.AddItem Source.List(Source.ListIndex)
Source.RemoveItem (Source.ListIndex)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -