Skip to main content

AccessTr.neT


Dizeleri Bir Listbox'tan Diğerine Sürükleyip Bırakın

Dizeleri Bir Listbox'tan Diğerine Sürükleyip Bırakın

Çözüldü #1
Visualbasic de yazılmış bu örneği accessde yapabilir miyiz
Drag and drop strings from one ListBox to another in Visual Basic .NET

' Start a drag.
Private Sub lst_MouseDown(ByVal sender As Object, ByVal e _
    As System.Windows.Forms.MouseEventArgs) Handles _
    lstFruits.MouseDown, lstAnimals.MouseDown
    Dim lst As ListBox = DirectCast(sender, ListBox)

    If e.Button = Windows.Forms.MouseButtons.Right Then
        Dim index As Integer = lst.IndexFromPoint(e.X, e.Y)
        If index <> ListBox.NoMatches Then
            Dim item As String = lst.Items(index)
            Dim drop_effect As DragDropEffects = _
                lst.DoDragDrop( _
                    lst.Items(index), _
                    DragDropEffects.Move Or _
                        DragDropEffects.Copy)

            ' If it was moved, remove the item from this
            ' list.
            If drop_effect = DragDropEffects.Move Then
                ' See if the user dropped the item in this
                ' ListBox
                ' at a higher position.
                If lst.Items(index) = item Then
                    ' The item has not moved.
                    lst.Items.RemoveAt(index)
                Else
                    ' The item has moved.
                    lst.Items.RemoveAt(index + 1)
                End If
            End If
        End If
    End If
End Sub
.zip drag_drop_listboxes.zip (Dosya Boyutu: 18,98 KB | İndirme Sayısı: 2)
@benbendedeilem
Son Düzenleme: 23/01/2020, 08:48, Düzenleyen: accessman.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Dizeleri Bir Listbox'tan Diğerine Sürükleyip Bırakın - Yazar: accessman - 23/01/2020, 08:35