Print Page | Close Window

FlatEdit OLE drag-drop

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=12198
Printed Date: 22 November 2024 at 2:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FlatEdit OLE drag-drop
Posted By: PPL1
Subject: FlatEdit OLE drag-drop
Date Posted: 18 September 2008 at 3:44pm
FlatEdit control OLEDragDrop event first parameter is XtremeSuiteControls.DataObject.
 
This DataObject is not the same as the DataObject of other VB controls. More important, if another drag source registers a clipboard format, the FlatEdit control DragDrop DataObject does not return it:
 
That is: Data.GetFormat(GridClipboardID) = False even though that clipboard format was registered (using GridClipboardID = RegisterClipboardFormat("GridGIDs")). As a consequence, I must use the regular VB textbox, which works just fine.
 
I'd like to use your control suite, but missing features and/or "improperly" implemented ones is causing me problems. Now... does an app look professional if some controls use visual styles (when using CodeJock's) and some don't (when I need to use VB stock) ? For uniformity, I can't use the CodeJock control suite, even though I'd like to.
 
Any chance that the CodeJock suite controls can be made closer to the VB stock ones?



Replies:
Posted By: Oleg
Date Posted: 19 September 2008 at 1:53am
Hi,
Works for me. :(
 
Here code I tried:
 
Private Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (ByVal lpString As String) As Integer
Dim GridClipboardID As Integer
Private Sub Command1_Click()
    Command1.OLEDrag
End Sub
Private Sub Command1_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
    Dim d(0 To 10) As Byte
   
    Data.SetData d, GridClipboardID
    AllowedEffects = vbDropEffectCopy
   
End Sub
Private Sub Form_Load()
GridClipboardID = RegisterClipboardFormat("GridGIDs")
End Sub
Private Sub Text1_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, state As Integer)
    If Data.GetFormat(GridClipboardID) Then
        Debug.Print "Data"
    End If
End Sub

Private Sub FlatEdit1_OLEDragOver(ByVal Data As XtremeSuiteControls.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(GridClipboardID) Then
        Debug.Print "Data!"
    End If
End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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