Page 1 of 1

error ole drag and drop in textbox

Posted: 27 Mar 2012, 04:22
by supersecretos
error ole drag and drop in textbox.

codigo of button:

Private Sub TextBox1_OLEDragDrop(ByVal data As EditCtlsLibUCtl.IOLEDataObject, effect As EditCtlsLibUCtl.OLEDropEffectConstants, ByVal button As Integer, ByVal shift As Integer, ByVal x As Single, ByVal y As Single)
If data.GetFormat(1) Then
TextBox1.Text = data.GetData(1, -1, 1)
ElseIf data.GetFormat(15) Then
End If
End Sub

please help

string of test:

[HD 1080p] SNSD 少女時代 소녀시대

see video attach for details

Test error over windows xp pro with service pack 3.

.

Re: error ole drag and drop in textbox

Posted: 27 Mar 2012, 06:46
by TiKu
Hi,

you're using format 1, which is vbCFText which is ANSI text. Try format 13, which is Unicode text.

Regards
TiKu

help data.Files.Item (1)

Posted: 27 Mar 2012, 07:35
by supersecretos
Thank you very much for the help.

another little thing, could you give me a link or website where this explained these values, because the help of control (chm) not detailed stuff, such as:

the values ​​for "FormatID" in method "data.GetData".

Other help. Now as I get the files. Previously "control non-unicode" used "data.Files.Item (1)" in the event oledraganddrop, but now with unicode controls it generates error.

Thanks in advance.

Re: error ole drag and drop in textbox

Posted: 27 Mar 2012, 08:01
by TiKu
You won't find a list of all possible formats. There are some standard formats like those defined by VB (vbCF* constants) and the Windows SDK (CF_* constants). I believe the CF_* constants are documented somewhere on MSDN. Additionally any format, that has been registered by a call to RegisterClipboardFormat API, can be used.
Of course not all formats are available in each situation.

Re: error ole drag and drop in textbox

Posted: 27 Mar 2012, 14:01
by supersecretos
Ok.

Thank you very much for the help.