Private Sub Form_Load() Picture1.OLEDragMode = 1 Text1.OLEDropMode = 1 End Sub Private Sub Picture1_OLEStartDrag(Data As DataObject, AllowedEffects As Long) AllowedEffects = 1 Data.Clear Data.SetData "<" & Now & ">", 1 End Sub Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim s As String s = Data.GetData(1) Text1.SelLength = 0 Text1.SelText = s End Sub
时间: 2024-10-03 22:50:16