Print Page | Close Window

Drag / Drop on

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=15907
Printed Date: 24 November 2024 at 7:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Drag / Drop on
Posted By: XiMaker
Subject: Drag / Drop on
Date Posted: 21 December 2009 at 6:58pm
I'm using the TaskPanel as a navigation menu for an MDI application - I allow users to also Drag/Drop items on the task panel to launch other applications.   I've added the code to do the drag drop and it works for external programs to be dropped into the task panel but when I try to move items already in the taskpanel menu to a new location (drag up or drag down) the items vanish.   The problem in part is due to the GetFormat because the items dragged don't have either format but I don't know that to check on- is there a different OLEDrag setting that I need to use for this type... is there a sample for this?

Private Sub wndToolBox_OLEDragDrop(ByVal Data As XtremeTaskPanel.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
   Const MODULE_NAME = "wndToolBox_OLEDragDrop"

   Dim Text As String
   Dim Index As Long
   Dim Ext As String
   Dim icount As Integer
   Dim iIndex As Integer
   Dim Group As TaskPanelGroup
   Dim fullpath As String
   Dim tItem As TaskPanelGroupItem
   
   


    If (Data.GetFormat(vbCFText)) Then
        Effect = vbDropEffectCopy
        Text = Data.GetData(vbCFText)
    ElseIf Data.GetFormat(vbCFFiles) Then
        Effect = vbDropEffectCopy
       
        For Each file In Data.Files
           fullpath = file
           Ext = LCase(Right(file, 3))
           ' Remove the extension
           Text = Left(file, Len(file) - 4)
           Do
              Index = InStr(Text, "\")
              If Index <= 0 Then
                  Exit Do
              End If
              Text = Right(Text, Len(Text) - Index)
           Loop
           Set Group = frmMain.MainMenuPane.wndToolBox.FocusedItem.Group
           CreateToolboxEXEItem Group, Text, fullpath

           bSaveMenuINI = True
       
        Next
    
    Else
        'Effect = vbDropEffectNone
   End If
End Sub

Private Sub wndToolBox_OLEDragOver(ByVal Data As XtremeTaskPanel.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal state As Integer)
    If (Data.GetFormat(vbCFText)) Then
        Effect = vbDropEffectCopy
    ElseIf Data.GetFormat(vbCFFiles) Then
        Effect = vbDropEffectCopy
    Else
'        Effect = vbDropEffectNone
    End If

End Sub



Replies:
Posted By: XiMaker
Date Posted: 29 December 2009 at 12:58pm
Anyone got anything for me on this one?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net