Solved

VB.net Drag and drop not working on a TaskPane

Posted on 2013-02-03
6
241 Views
Last Modified: 2013-02-09
Hi

I have a TaskPane in my VB.net app where I had drag and drop working
on a RichTextBox. I then tried to cancel this and do the same on a ListBox but nothing works
even though I have set Allow Drop to true.
0
Comment
Question by:murbro
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 38848382
Hi ...Can you show some Code?
0
 

Author Comment

by:murbro
ID: 38848396
Here's the code where it works. If I try to do the same with a ListBox it doesn't


 Private Sub txtWhereColumnVariables_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles txtWhereColumnVariables.DragDrop
        Try
 
            Dim oDroppedText As String
            If e.Data.GetDataPresent(System.Windows.Forms.DataFormats.StringFormat) Then
                oDroppedText = e.Data.GetData(System.Windows.Forms.DataFormats.StringFormat).ToString()
                Me.txtWhereColumnVariables.Text = oDroppedText

                If Globals.ThisAddIn.oRIGHT.lblDataBaseType.Text = "Access" Then
                    If Mid(oDroppedText, 1, 1) = "[" Then
                        Dim arrSplit As Object = Split(oDroppedText, ".")
                        Dim oTableName As String = Mid(arrSplit(0), 2, Len(arrSplit(0)) - 2)
                        Dim oColumnName As String = Mid(arrSplit(1), 2, Len(arrSplit(1)) - 2)
                        Dim oResult As String = oGet_Access_Data_Type_Look(oTableName, oColumnName)
                        Me.txtWhereColumnVariables.Text = Me.txtWhereColumnVariables.Text & " " & oResult
                        Call oLoadListBox(oTableName, oColumnName)
                    End If
                Else
                    If Mid(oDroppedText, 1, 1) = "[" Then
                        Dim arrSplit As Object = Split(oDroppedText, ".")
                        Dim oTableName As String = Mid(arrSplit(0), 2, Len(arrSplit(0)) - 2)
                        Dim oColumnName As String = Mid(arrSplit(1), 2, Len(arrSplit(1)) - 2)
                        Dim oResult As String = Get_SQL_Data_Type_Look(oTableName, oColumnName)
                        Me.txtWhereColumnVariables.Text = Me.txtWhereColumnVariables.Text & " " & oResult
                        Call oLoadListBox(oTableName, oColumnName)
                    End If
                End If
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
0
 
LVL 18

Assisted Solution

by:John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou earned 250 total points
ID: 38848417
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:murbro
ID: 38848489
Thanks.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 38848555
0
 

Author Closing Comment

by:murbro
ID: 38871426
Thanks for the help
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now