-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.vb
30 lines (25 loc) · 1.04 KB
/
Main.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Imports DevExpress.XtraEditors
Imports System
Imports System.Windows.Forms
Namespace DXSample
Partial Public Class Main
Inherits XtraForm
Private provider As DragDropProvider
Public Sub New()
InitializeComponent()
End Sub
Private Sub OnMainFormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles MyBase.FormClosing
If provider IsNot Nothing Then
provider.DisableDragDrop()
End If
End Sub
Private Sub OnMainLoad(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
provider = New DragDropProvider(pictureEdit1)
provider.EnableDragDrop()
End Sub
Private Sub OnSimpleButtonMouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles simpleButton2.MouseDown, simpleButton1.MouseDown
Dim btn As SimpleButton = TryCast(sender, SimpleButton)
pictureEdit1.DoDragDrop(btn.Image, DragDropEffects.Copy)
End Sub
End Class
End Namespace