home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / cmdbtnx5.msi / Cabs.w1.cab / OLEDragAndDrop.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-01  |  7.0 KB  |  208 lines

  1. VERSION 5.00
  2. Object = "{20976770-692B-4564-84B5-CCC822AA2B7A}#1.2#0"; "CmdBtnX5.ocx"
  3. Begin VB.Form frmOLEDragAndDrop 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "OLE Drag and Drop Demonstration"
  6.    ClientHeight    =   6090
  7.    ClientLeft      =   1950
  8.    ClientTop       =   1545
  9.    ClientWidth     =   6180
  10.    BeginProperty Font 
  11.       Name            =   "Tahoma"
  12.       Size            =   8.25
  13.       Charset         =   0
  14.       Weight          =   400
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    Icon            =   "OLEDragAndDrop.frx":0000
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   406
  24.    ScaleMode       =   3  'Pixel
  25.    ScaleWidth      =   412
  26.    ShowInTaskbar   =   0   'False
  27.    StartUpPosition =   2  'CenterScreen
  28.    Begin VB.TextBox txtDrop 
  29.       Height          =   1950
  30.       Left            =   4365
  31.       MultiLine       =   -1  'True
  32.       OLEDragMode     =   1  'Automatic
  33.       OLEDropMode     =   2  'Automatic
  34.       ScrollBars      =   2  'Vertical
  35.       TabIndex        =   8
  36.       Text            =   "OLEDragAndDrop.frx":014A
  37.       Top             =   3960
  38.       Width           =   1680
  39.    End
  40.    Begin VB.CommandButton cmdDrag 
  41.       Caption         =   "Start Drag"
  42.       Height          =   330
  43.       Left            =   2475
  44.       TabIndex        =   5
  45.       Top             =   3285
  46.       Width           =   1140
  47.    End
  48.    Begin VB.Frame Frame1 
  49.       Caption         =   "Allowed Drag Effects:"
  50.       BeginProperty Font 
  51.          Name            =   "Tahoma"
  52.          Size            =   8.25
  53.          Charset         =   0
  54.          Weight          =   700
  55.          Underline       =   0   'False
  56.          Italic          =   0   'False
  57.          Strikethrough   =   0   'False
  58.       EndProperty
  59.       Height          =   1095
  60.       Left            =   135
  61.       TabIndex        =   2
  62.       Top             =   2520
  63.       Width           =   2220
  64.       Begin VB.CheckBox chkMove 
  65.          Caption         =   "Move"
  66.          Height          =   285
  67.          Left            =   270
  68.          TabIndex        =   4
  69.          Top             =   630
  70.          Value           =   1  'Checked
  71.          Width           =   1140
  72.       End
  73.       Begin VB.CheckBox chkCopy 
  74.          Caption         =   "Copy"
  75.          Height          =   285
  76.          Left            =   270
  77.          TabIndex        =   3
  78.          Top             =   315
  79.          Value           =   1  'Checked
  80.          Width           =   1140
  81.       End
  82.    End
  83.    Begin CommandButtonXDemo.pucEventList evlOLE 
  84.       Height          =   2175
  85.       Left            =   135
  86.       TabIndex        =   7
  87.       Top             =   3735
  88.       Width           =   4065
  89.       _ExtentX        =   7170
  90.       _ExtentY        =   3836
  91.       ExitVisible     =   -1  'True
  92.    End
  93.    Begin VB.ComboBox cboOLEDropMode 
  94.       Height          =   315
  95.       ItemData        =   "OLEDragAndDrop.frx":019F
  96.       Left            =   135
  97.       List            =   "OLEDragAndDrop.frx":01A9
  98.       Style           =   2  'Dropdown List
  99.       TabIndex        =   1
  100.       Top             =   2070
  101.       Width           =   2265
  102.    End
  103.    Begin CommandButtonXDemo.pucTextTip pucSimpleTip1 
  104.       Height          =   780
  105.       Left            =   135
  106.       Top             =   945
  107.       Width           =   5910
  108.       _ExtentX        =   10425
  109.       _ExtentY        =   1376
  110.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  111.          Name            =   "Tahoma"
  112.          Size            =   8.25
  113.          Charset         =   0
  114.          Weight          =   400
  115.          Underline       =   0   'False
  116.          Italic          =   0   'False
  117.          Strikethrough   =   0   'False
  118.       EndProperty
  119.       Text            =   $"OLEDragAndDrop.frx":01D1
  120.    End
  121.    Begin CommandButtonXCtl.CommandButtonX cmdxDemo 
  122.       Height          =   1725
  123.       Left            =   3870
  124.       TabIndex        =   6
  125.       Top             =   1935
  126.       Width           =   2175
  127.       _ExtentX        =   3836
  128.       _ExtentY        =   3043
  129.       DropDownPicture =   "OLEDragAndDrop.frx":0286
  130.       PictureAlignment=   3
  131.       Caption         =   "Drop Target"
  132.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  133.          Name            =   "Tahoma"
  134.          Size            =   8.25
  135.          Charset         =   0
  136.          Weight          =   400
  137.          Underline       =   0   'False
  138.          Italic          =   0   'False
  139.          Strikethrough   =   0   'False
  140.       EndProperty
  141.    End
  142.    Begin VB.Label lblHdr 
  143.       AutoSize        =   -1  'True
  144.       Caption         =   "OLEDropMode:"
  145.       Height          =   195
  146.       Left            =   135
  147.       TabIndex        =   0
  148.       Top             =   1845
  149.       Width           =   1080
  150.    End
  151.    Begin CommandButtonXDemo.pucLogoPane LogoPane1 
  152.       Align           =   1  'Align Top
  153.       Height          =   780
  154.       Left            =   0
  155.       Top             =   0
  156.       Width           =   6180
  157.       _ExtentX        =   10901
  158.       _ExtentY        =   1376
  159.       Picture         =   "OLEDragAndDrop.frx":0308
  160.    End
  161. Attribute VB_Name = "frmOLEDragAndDrop"
  162. Attribute VB_GlobalNameSpace = False
  163. Attribute VB_Creatable = False
  164. Attribute VB_PredeclaredId = True
  165. Attribute VB_Exposed = False
  166. Option Explicit
  167. DefInt A-Z
  168. Private Sub cboOLEDropMode_Click()
  169.  cmdxDemo.OLEDropMode = cboOLEDropMode.ListIndex
  170. End Sub
  171. Private Sub cmdClose_Click()
  172.  Unload Me
  173. End Sub
  174. Private Sub cmdDrag_Click()
  175.  cmdxDemo.OLEDrag
  176. End Sub
  177. Private Sub cmdxDemo_OLECompleteDrag(Effect As Long)
  178.  evlOLE.Add "OLECompleteDrag", Effect
  179. End Sub
  180. Private Sub cmdxDemo_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  181.  evlOLE.Add "OLEDragDrop", "{DATA}", Effect, Button, Shift, X, Y
  182. End Sub
  183. Private Sub cmdxDemo_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  184.  evlOLE.Add "OLEDragOver", "{DATA}", Effect, Button, Shift, X, Y, State
  185. End Sub
  186. Private Sub cmdxDemo_OLEGiveFeedback(Effect As Long, DefaultCursors As Boolean)
  187.  evlOLE.Add "OLEGiveFeedback", Effect, DefaultCursors
  188. End Sub
  189. Private Sub cmdxDemo_OLESetData(Data As DataObject, DataFormat As Integer)
  190.  evlOLE.Add "OLESetData", "{DATA}", DataFormat
  191. End Sub
  192. Private Sub cmdxDemo_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
  193.  Data.SetData "Ariad CommandButtonX Control 5", vbCFText
  194.  If chkCopy Then
  195.   AllowedEffects = AllowedEffects Or vbDropEffectCopy
  196.  End If
  197.  If chkMove Then
  198.   AllowedEffects = AllowedEffects Or vbDropEffectMove
  199.  End If
  200.  evlOLE.Add "OLEStartDrag", "{DATA}", AllowedEffects
  201. End Sub
  202. Private Sub evlOLE_ExitClicked()
  203.  Unload Me
  204. End Sub
  205. Private Sub Form_Load()
  206.  cboOLEDropMode.ListIndex = cmdxDemo.OLEDropMode
  207. End Sub
  208.