Now Available!

Native .Net
Components

TList WinForms
for
.Net Framework

&

MetaDraw WinForms
for
.Net Framework



Bennet-Tec
Components
Make you
look sharp!



Home

Company

Products

Order Forms

How To

Downloads

Updates

Support

Registration

Dependencies

Links

Compatibility

Site Map


Basic How To


How to Implement Drag & Drop

Download VB Sample
Return to main How To Page

ALLText 4 supports standard VB DragDrop methods as well as support for the dropping of files from file manager style programs into ALLText. The OCX editions of ALLText also provide fully automated support for drag/drop of selected text and embedded objects within the document.

The standard VB DragDrop properties and events are supported for standard drag and drop. (See standard VB help for documentation information.)

In order to support dragging of files from FileManager, ALLText 4 includes a DropFileMode property as well as DropFileStart and DropFile events. The DropFileMode property determines whether ALLText will (=1) or will not (=0) respond to files dropped from File Manager. With DropFileMode ON, ALLText will first trigger the event ATX_DropFileStart providing X and Y coordinates for the drop location and a third parameter indicating the number of files being dropped. Next the ATX_DropFile event will be triggered once for each file dropped and will provide the name of the file being dropped.

DropFileMode Property

Description: The setting of this property determines whether ALLText will accept files Dropped from File Manager, triggering DropFile and DropFileStart Events.

Syntax:

ATX.DropFileMode = <0,1>
e% = ATX.DropFileMode

Settings:

DropFileMode = 0 - Do not accept files dropped from File Manager
DropFileMode = 1 - Accept files dropped from File Manager

Default : 1

DataType: Enum

References:

DROPFILESTART - event
DROPFILE - event

DropFileStart Event

Description: This event occurs every time you drop one or more files from File Manager before you get any DROPFILE event. It is triggered only if allowed by the DropFileMode property.

Visual Basic: Sub ALLText_DropFileStart(X As Long, Y As Long, FNumber As Integer)

Remarks: This event provides access to the X and Y coordinates where the Left mouse button was released while performing Drag-n-Drop operation. The value of parameter FNumber is equal the number of files taken from File Manager. You can change FNumber if your application does not support multiple file Drag-n-Drop operation. (For example you can set FNumber to 0)

References:

DropFile - event
DropFileMode - property

DropFile Event

Description: This event occurs each time ALLText window receives DROPFILE event. It is triggered only if allowed by the DropFileMode property.

Visual Basic: Sub ALLText_DropFile(X As Long, Y As Long, FName As String, FIndex As Integer)

Remarks: This event provides access to the X and Y coordinates where the Left mouse button was released while performing Drag-n-Drop operation. Parameter FName contains file name being dropped to the ALLText window. Parameter FIndex can be used to break Drag and Drop processing if an error occurred. This can be done by setting Findex flag to (1).

References:

DropFileStart - event
DropFileMode - property


Copyrightę 2003 Bennet-Tec Information Systems, Inc. All rights reserved.