home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
del_drag
/
dlaymain.frm
(
.txt
)
< prev
Wrap
Visual Basic Form
|
1992-04-25
|
14KB
|
483 lines
MainForm
Delayed Drag Demo
wwwww
Form1
FileList
SourceList
Command2
Exit
FileCabinetOpen
wwwwp
FileCabinetClosed
FileCabinet
Command1
Show Items in Cabinet
Drive1_Change
Drive1
Drive!
Dir1_Change}
File1
File1_ClickO
File1_DblClick
SwitchesZ
Form_Click
Index
Form_Compile
Text_Input
Text<
FileName
File_O_Dialog
ToOpeno
Field_Prog_Name
oneLine
SelText
ToSave
Field_Save
@ Form_Load
Dir2_Change*
Drive2_Change
File_Actions
Do_Whatd
which=
Case2
File2
File2_Click
File2_DblClickG
File_Click
Directory_Changet
Drive_Changef
Directory{
File_DblClickK
WhatFile
FileListBox
Drive2
File1_DragOver
Source
State
Dir1_KeyDown'
KeyCode
ShiftY
List4
ListIndex
Dir2_KeyDown"
File1_GotFocus8
Copy{
Caption
File2_GotFocusW
Move_
Delete_Clickx
FileList
ListCount.
List1
DestDir}
FullPathName
dirname
Count@
Counmt
SourceDir,
Quit_Click
Menu_File_ClickV
Menu_FileSelection_Click^
Inedex
AboutFM1l
OldFocusk
Copy_Click/
CommandString
TaskNum
visibleX
ChooseDest
OpenCloseDemo#
TestString
FName8
MousePointer
SizeI
BufferT
DestFileName
Label1_Click
WhichOptionB
HeaderK
CurrentX
CenterHeaderText
Width
CurrentY
HeightX
Headr
AddFiles_Option_Click
Destination_Option_Click
FileCaption
DestCaptionC
AddFiles_Option_GotFocus
Destination_Option_GotFocusX
Destination_Option
AddFiles_optionH
value"
DestPath
DestDestPath
Center
DestPathText6
Responsei
FileCaption_Click
FileCaption_DblClickl
Move__Click!
MkDir__Click
DestCaption_Click
DestCaption_DblClick
DestPath_ClickB
DestPath_DblClick
Rename_Click
MkDirBox
FALSE
MkDirCancel_Click
MkDirTextl
MkDirBox_DragDrop
MkDirText_Change
MkDirText_GotFocus
MkDirDo_Click
NewDirName
MkDirText_KeyDown
MkDirLabel3
extCharPos8
HereCount
Dir1_Click
Dir2_GotFocus
Dir1_GotFocus
FileList_Click
FileList_MouseDownu
Button]
FileList_MouseMove
FileList_MouseUp;
Singl
ThenFileList_MouseMovek
SourceFileFullPath
FileList_LostFocus
Butoon
SourceOrDestHeaderTextA
SourceOrDestCaption%
SourceOrDestHeader1
SourceFilesHeaderText&
SourceOr9
HereT
SourceOrDest{
dotPosition
ThenMkDirLabel3
RmDir__Click
Dir2_Path
Drive2_GotFocus
ErrorHandler]
MkDirErrorHandler0
RmDirErrorHandler
PositionB
Holder
Menu_TipsSelection_Click
FM1_Tips
SmBuf
MedBufi
LgBufj
SMALL
MEDIUM
LARGE
FileSize
WhichBuffer
TinyBuf
IntegerDim
SizeLeft-
LoopCount
OldSize
StartSize
NumberOfInts+
NumOfInts
BufSize
FileBufSizeB
BufSizeLeftj
FileSizeLeftE
FilePositionJ
SourceOrDestCaption_Click
SourceOrDestCaption_DblClickx
DriveError
Drive2Error
Drive1Error
ChangeDestDir/
change
Curren
Current]
OldCurDirw
Parentq
DirFocus
Dir_15
Dir_2
Dir2_ClickP
DriveLetter{
Source_Option_Click
Source_Dir
Destination_Dir
SelectDir
SourcePath3
FileFullPath
SourceDirLabel_Click
DestHeader
SourceHeader
SoyrceCaption
SourceCaption
(SourSourSourSourSourSourSourSourSourSour
(ourSourSourSourSourSourSourSourSourSourSi
(urSourSourSourSourSourSourSourSourSourSo\
FileListHeader
SourcePathText
DestPathTrim'
ZZZPathText
SourceDirText
WhichDir
Destination0
Source_Option
Click
OrigDir
OrigDrive
LeftStringM
Form_UnLoad?
Cancel
TempName
Command1_Click/
DestDirLabel
BackColorw
ForeColor
Black
White
SourceDirLabelE
HiLiteWhichDir
OldWhichDir
Form1_UnLoadd
Form1+
DestDirLabel_ClickL
SourceCaption_Click$
OldDriveK
MoveForm
Actiono
Proceed
Mainform
Menu_Tips_Clickt
Menu_OptionsSelection_Click
Menu_Options_Click
Move_Click
Rename__Click
MoveIt_Click
RenameItClick
Dir2_MouseDownR
Dir1_MouseDown
QuitForm
DelForm
FromWhere
FromMove,
Command2_Click
BitBlt
dial_pic
dial_offScreen
SrcCopy
DialDo_Click
DialClear_Click
Progress
color_offScreen
SRCANDj
DialDraw
HowMuch:
DialReset
File1_MouseDown
File1_DoubleClick
File1_MouseUp
File1_LostFocusC
File1_MouseMouseMoveW
File1_MouseMouse
File1_MouseMove
OldStartY
OldListIndexe
DoEents
Enabled2
DeleteS
MoveItA
Text1_Change
Text1_KeyDown
Pattern
Text1{
tempPic
Picture+
TrashPicG
trasht
offtrash
trash_Clickv
ElseButton
trash_DragOver
trash_DragDropa
DragIcon
Screen
TrashCountI
TrashForm
TrashList
TrashPathName
IfTempName
TrashFileList
trashfor%
trash_DblClick
ThenTrashformB
offtrash_Clickw
TrashPicIndex
darktrashX
ThentrashPicIndex
Source_Option_DragOver
fullTrash_Click
fullTrash_DragOver
darkFullTrash
fullTrash_DragDrop
AddTrashList
fullTrash
fullTrash_DblClick
darkTrash_ClickT
FullTrshC
File2_MouseMove)
File2_MouseDownm
File2_MouseDownButton
darkTrash_DragDropj
FileList_DblClick
capic
Command3_Click-
SuCommand3_Clickl
EnEnd
Command4_ClickU
darkFullTrash_Click
can_Click
can_DragOverg
canner_Click.
TrashState
SrCopy
plaintrash
RmDirErrorHandler2d
TrshForm
List1_Click
List1_MouseDown
draktrashQ
trashCan
empty
emptyTrash
trashCan_Click
trashCan_DragDrop{
trashCan_DragOver
trashCan_DblClickE
List1_MouseMove
List1_MouseUp
ExitDemo_Clicko
emptyTrash_ClickV
destDC
srcDC
RasterOp
Add2X
List2
Number
SourceList
List2_Click
List2_MouseDown
List1_DragDrop
List2_DragDrop
List2_MouseUp
ThenList1+
SetIndex
darkFullTrash_DblClick
List2_MouseMove
SourceList_Click
SourceList_DragDrop
SourceList_MouseDown
SourceList_MouseMove
MouseDownStart
SourceList_MouseUp4
pointer_
MouseDownTimen
Watching<
Theny
Pring
SendMessage
wMsgB
wParam
lParam
LB_GETITEMRECTA
WM_USER
WN_USER
RECT:
right
bottom
ListRect
SourcehWnd
GetFocus%
PutFocusR
ShWnd"
FileCabinet
FileCabinet_DragOver
FileCabinet_DragDrop
FileCabinet_DblClick.
FileCabinetClosed0
FileCabinetOpen
CabinetList
Exit_Click
MouseIsDown
MouseCountStart
StartMouseTimer
StartPosition
SelectedItem
SelectedItemift
SelectedItemowR
StartingItem
StartItem
LEFT_BUTTON
MouseTimer
OldItemo
Timer1_Timer
OldMarker
Markere
first
checks
Simms
haveZ
FileList_GotFocus
FlhWnd
LRect
GetWindowRect
LBWRectw
lpRect
ListShowing(
Showing
begins
could
might
matter
program
because
Start
Finish
Adjuster
calls
determine
.4414063
Label1
Adjust
The Delayed Drag Routine code is contained in the
FileList_MouseMove event. The basic idea is to countM
how long the mouse is moved over a particular item (Marker)
before dragging begins. It also checks to see whether the
Marker is on a selected item and whether or not the cursorr
is in the listbox boundary before dragging begins..
Since the users system clock will vary an "Adjuster" had to
be determined to keep the delay the same for all users. I think
it should do the trick. The API calls to determine "Showing""
are necessary to determine the number of items that can be"
displayed in the listbox at one time. This can vary
because of the users display. So these calls make sure we'vee
got the right count..
If you need any help, let me know and good luck!!
Jeff Simms 72200,31733
UserT
UserT
Form_Load
File Number
FileCabinet_DragOver
FileCabinet_DragDrop
Command1_Click
FileList_MouseMove
Command2_Click
FileList_GotFocus