?
Solved

VB.net Drag and drop not working on a TaskPane

Posted on 2013-02-03
6
Medium Priority
?
256 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

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

Author Comment

by:Murray Brown
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 1000 total points
ID: 38848417
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Murray Brown
ID: 38848489
Thanks.
0
 
LVL 70

Accepted Solution

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

Author Closing Comment

by:Murray Brown
ID: 38871426
Thanks for the help
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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