home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 June / Chip_2002-06_cd1.bin / zkuste / vbasic / Data / Utils / ahtmlle2.exe / MAINDIR / OLEDragAndDrop.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-09  |  7.2 KB  |  210 lines

  1. VERSION 5.00
  2. Object = "{E4D5D928-FD35-4D0A-92CD-F3CE02D68455}#1.0#0"; "ahtmlle2.ocx"
  3. Begin VB.Form frmOLEDragAndDrop 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "OLE Drag and Drop Demonstration"
  6.    ClientHeight    =   6360
  7.    ClientLeft      =   1950
  8.    ClientTop       =   1545
  9.    ClientWidth     =   7035
  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     =   424
  24.    ScaleMode       =   3  'Pixel
  25.    ScaleWidth      =   469
  26.    ShowInTaskbar   =   0   'False
  27.    StartUpPosition =   2  'CenterScreen
  28.    Begin HTMLCtlsLEDemo.pucEventList evlOLE 
  29.       Height          =   2175
  30.       Left            =   225
  31.       TabIndex        =   7
  32.       Top             =   3915
  33.       Width           =   3930
  34.       _ExtentX        =   6932
  35.       _ExtentY        =   3836
  36.       ExitVisible     =   -1  'True
  37.    End
  38.    Begin VB.TextBox txtDrop 
  39.       Height          =   1950
  40.       Left            =   4410
  41.       MultiLine       =   -1  'True
  42.       OLEDragMode     =   1  'Automatic
  43.       OLEDropMode     =   2  'Automatic
  44.       ScrollBars      =   2  'Vertical
  45.       TabIndex        =   8
  46.       Text            =   "OLEDragAndDrop.frx":014A
  47.       Top             =   4095
  48.       Width           =   2400
  49.    End
  50.    Begin VB.CommandButton cmdDrag 
  51.       Caption         =   "Start Drag"
  52.       Height          =   330
  53.       Left            =   2520
  54.       TabIndex        =   6
  55.       Top             =   3420
  56.       Width           =   1140
  57.    End
  58.    Begin VB.Frame Frame1 
  59.       Caption         =   "Allowed Drag Effects:"
  60.       BeginProperty Font 
  61.          Name            =   "Tahoma"
  62.          Size            =   8.25
  63.          Charset         =   0
  64.          Weight          =   700
  65.          Underline       =   0   'False
  66.          Italic          =   0   'False
  67.          Strikethrough   =   0   'False
  68.       EndProperty
  69.       Height          =   1095
  70.       Left            =   180
  71.       TabIndex        =   3
  72.       Top             =   2655
  73.       Width           =   2220
  74.       Begin VB.CheckBox chkMove 
  75.          Caption         =   "Move"
  76.          Height          =   285
  77.          Left            =   270
  78.          TabIndex        =   5
  79.          Top             =   630
  80.          Value           =   1  'Checked
  81.          Width           =   1140
  82.       End
  83.       Begin VB.CheckBox chkCopy 
  84.          Caption         =   "Copy"
  85.          Height          =   285
  86.          Left            =   270
  87.          TabIndex        =   4
  88.          Top             =   315
  89.          Value           =   1  'Checked
  90.          Width           =   1140
  91.       End
  92.    End
  93.    Begin VB.ComboBox cboOLEDropMode 
  94.       Height          =   315
  95.       ItemData        =   "OLEDragAndDrop.frx":022E
  96.       Left            =   180
  97.       List            =   "OLEDragAndDrop.frx":0238
  98.       Style           =   2  'Dropdown List
  99.       TabIndex        =   2
  100.       Top             =   2205
  101.       Width           =   2265
  102.    End
  103.    Begin HTMLCtlsLE.HTMLLabel pucSimpleTip1 
  104.       Height          =   825
  105.       Left            =   180
  106.       TabIndex        =   0
  107.       Top             =   945
  108.       Width           =   6630
  109.       _ExtentX        =   11695
  110.       _ExtentY        =   1455
  111.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  112.          Name            =   "Tahoma"
  113.          Size            =   8.25
  114.          Charset         =   0
  115.          Weight          =   400
  116.          Underline       =   0   'False
  117.          Italic          =   0   'False
  118.          Strikethrough   =   0   'False
  119.       EndProperty
  120.       BorderStyle     =   12
  121.       BackStyle       =   0
  122.       BackColor       =   -2147483624
  123.       ForeColor       =   -2147483625
  124.       Text            =   $"OLEDragAndDrop.frx":024A
  125.    End
  126.    Begin HTMLCtlsLE.HTMLLabel hbxDemo 
  127.       Height          =   1725
  128.       Left            =   3915
  129.       TabIndex        =   9
  130.       Top             =   2070
  131.       Width           =   2895
  132.       _ExtentX        =   5106
  133.       _ExtentY        =   3043
  134.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  135.          Name            =   "Tahoma"
  136.          Size            =   8.25
  137.          Charset         =   0
  138.          Weight          =   400
  139.          Underline       =   0   'False
  140.          Italic          =   0   'False
  141.          Strikethrough   =   0   'False
  142.       EndProperty
  143.       Text            =   "Welcome to the <b>HTMLLabel</b> OLE Drag and Drop Demonstration."
  144.    End
  145.    Begin HTMLCtlsLEDemo.pucLogoPane pucLogoPane1 
  146.       Align           =   1  'Align Top
  147.       Height          =   750
  148.       Left            =   0
  149.       Top             =   0
  150.       Width           =   7035
  151.       _ExtentX        =   12409
  152.       _ExtentY        =   1323
  153.       Picture         =   "OLEDragAndDrop.frx":02FF
  154.    End
  155.    Begin VB.Label lblHdr 
  156.       AutoSize        =   -1  'True
  157.       Caption         =   "OLEDropMode:"
  158.       Height          =   195
  159.       Left            =   180
  160.       TabIndex        =   1
  161.       Top             =   1980
  162.       Width           =   1080
  163.    End
  164. Attribute VB_Name = "frmOLEDragAndDrop"
  165. Attribute VB_GlobalNameSpace = False
  166. Attribute VB_Creatable = False
  167. Attribute VB_PredeclaredId = True
  168. Attribute VB_Exposed = False
  169. Option Explicit
  170. Private Sub cboOLEDropMode_Click()
  171.     hbxDemo.OLEDropMode = cboOLEDropMode.ListIndex
  172. End Sub
  173. Private Sub cmdDrag_Click()
  174.     hbxDemo.OLEDrag
  175. End Sub
  176. Private Sub evlOLE_ExitClicked()
  177.     Unload Me
  178. End Sub
  179. Private Sub hbxDemo_OLECompleteDrag(Effect As Long)
  180.     evlOLE.Add "OLECompleteDrag", Effect
  181. End Sub
  182. Private Sub hbxDemo_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
  183.     evlOLE.Add "OLEDragDrop", "{DATA}", Effect, Button, Shift, X, Y
  184.     If Data.GetFormat(vbCFText) Then
  185.         hbxDemo.Text = Data.GetData(vbCFText)
  186.     End If
  187. End Sub
  188. Private Sub hbxDemo_OLEDragOver(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single, State As Integer)
  189.     evlOLE.Add "OLEDragOver", "{DATA}", Effect, Button, Shift, X, Y, State
  190. End Sub
  191. Private Sub hbxDemo_OLEGiveFeedback(Effect As Long, DefaultCursors As Boolean)
  192.     evlOLE.Add "OLEGiveFeedback", Effect, DefaultCursors
  193. End Sub
  194. Private Sub hbxDemo_OLESetData(Data As DataObject, DataFormat As Integer)
  195.     evlOLE.Add "OLESetData", "{DATA}", DataFormat
  196. End Sub
  197. Private Sub hbxDemo_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
  198.     Data.SetData "Ariad Software's <b>HTMLLabel</b> control.", vbCFText
  199.     If chkCopy Then
  200.         AllowedEffects = AllowedEffects Or vbDropEffectCopy
  201.     End If
  202.     If chkMove Then
  203.         AllowedEffects = AllowedEffects Or vbDropEffectMove
  204.     End If
  205.     evlOLE.Add "OLEStartDrag", "{DATA}", AllowedEffects
  206. End Sub
  207. Private Sub Form_Load()
  208.     cboOLEDropMode.ListIndex = hbxDemo.OLEDropMode
  209. End Sub
  210.