main.dfm 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. object FormMain: TFormMain
  2. Left = 155
  3. Top = 211
  4. BorderStyle = bsDialog
  5. Caption = 'Async Data Transfer Demo - Drop source'
  6. ClientHeight = 368
  7. ClientWidth = 573
  8. Color = clBtnFace
  9. Font.Charset = DEFAULT_CHARSET
  10. Font.Color = clWindowText
  11. Font.Height = -11
  12. Font.Name = 'Arial'
  13. Font.Style = []
  14. OldCreateOrder = False
  15. Position = poDefaultPosOnly
  16. OnCreate = FormCreate
  17. OnDestroy = FormDestroy
  18. PixelsPerInch = 96
  19. TextHeight = 14
  20. object StatusBar1: TStatusBar
  21. Left = 0
  22. Top = 349
  23. Width = 573
  24. Height = 19
  25. Panels = <>
  26. SimplePanel = True
  27. end
  28. object Panel2: TPanel
  29. Left = 0
  30. Top = 105
  31. Width = 573
  32. Height = 229
  33. Cursor = crHandPoint
  34. Align = alClient
  35. BevelOuter = bvNone
  36. Caption = ' '
  37. ParentColor = True
  38. TabOrder = 1
  39. object Panel3: TPanel
  40. Left = 0
  41. Top = 0
  42. Width = 185
  43. Height = 229
  44. Align = alLeft
  45. BevelOuter = bvLowered
  46. Caption = ' '
  47. ParentColor = True
  48. TabOrder = 0
  49. object PaintBoxPie: TPaintBox
  50. Left = 1
  51. Top = 1
  52. Width = 183
  53. Height = 227
  54. end
  55. end
  56. object Panel4: TPanel
  57. Left = 185
  58. Top = 0
  59. Width = 388
  60. Height = 229
  61. Align = alClient
  62. BevelOuter = bvLowered
  63. BorderWidth = 8
  64. Caption = ' '
  65. TabOrder = 1
  66. object Memo2: TMemo
  67. Left = 24
  68. Top = 24
  69. Width = 356
  70. Height = 89
  71. TabStop = False
  72. BorderStyle = bsNone
  73. Enabled = False
  74. Lines.Strings = (
  75. 'During a normal data transfer the source application will be blo' +
  76. 'cked '
  77. 'while the transfer takes place because the applicaion is unable ' +
  78. 'to '
  79. 'process events.'
  80. 'Notice that the timer stops and the form can'#39't be moved or repai' +
  81. 'nted '
  82. 'during a normal data transfer.')
  83. ParentColor = True
  84. ReadOnly = True
  85. TabOrder = 0
  86. WantReturns = False
  87. end
  88. object RadioButtonNormal: TRadioButton
  89. Left = 8
  90. Top = 8
  91. Width = 353
  92. Height = 17
  93. Caption = 'Normal synchronous transfer'
  94. Checked = True
  95. TabOrder = 1
  96. TabStop = True
  97. end
  98. object Memo3: TMemo
  99. Left = 24
  100. Top = 136
  101. Width = 356
  102. Height = 89
  103. TabStop = False
  104. BorderStyle = bsNone
  105. Enabled = False
  106. Lines.Strings = (
  107. 'During an asynchronous data transfer the data transfer is perfor' +
  108. 'med in '
  109. 'a separate thread so the source application appears unaffected b' +
  110. 'y the '
  111. 'transfer.'
  112. 'Notice that the timer continues and the form can be moved and re' +
  113. 'painted '
  114. 'during an asynchronous data transfer.'
  115. ''
  116. ' ')
  117. ParentColor = True
  118. ReadOnly = True
  119. TabOrder = 3
  120. WantReturns = False
  121. end
  122. object RadioButtonAsync: TRadioButton
  123. Left = 8
  124. Top = 120
  125. Width = 361
  126. Height = 17
  127. Caption = 'Asynchronous transfer'
  128. TabOrder = 2
  129. end
  130. end
  131. end
  132. object ProgressBar1: TProgressBar
  133. Left = 0
  134. Top = 334
  135. Width = 573
  136. Height = 15
  137. Align = alBottom
  138. Min = 0
  139. Max = 1000000
  140. Step = 1024
  141. TabOrder = 2
  142. end
  143. object Panel5: TPanel
  144. Left = 0
  145. Top = 0
  146. Width = 573
  147. Height = 105
  148. Align = alTop
  149. BevelOuter = bvLowered
  150. Caption = ' '
  151. TabOrder = 3
  152. object Memo1: TMemo
  153. Left = 113
  154. Top = 1
  155. Width = 459
  156. Height = 103
  157. Align = alClient
  158. BorderStyle = bsNone
  159. Lines.Strings = (
  160. 'This example demonstrates how to source a drop from a thread.'
  161. 'The advantage of using a thread is that the source application i' +
  162. 'sn'#39't blocked while the target '
  163. 'application processes the drop.'
  164. ''
  165. 'Note that this approach is normally only used when transferring ' +
  166. 'large amounts of data or '
  167. 'when the drop target is very slow.'
  168. ''
  169. ' ')
  170. ParentColor = True
  171. ReadOnly = True
  172. TabOrder = 0
  173. WantReturns = False
  174. end
  175. object Panel6: TPanel
  176. Left = 1
  177. Top = 1
  178. Width = 112
  179. Height = 103
  180. Cursor = crHandPoint
  181. Align = alLeft
  182. BevelOuter = bvNone
  183. Caption = 'Drag this'
  184. Font.Charset = DEFAULT_CHARSET
  185. Font.Color = clBlue
  186. Font.Height = -21
  187. Font.Name = 'Arial'
  188. Font.Style = []
  189. ParentFont = False
  190. TabOrder = 1
  191. OnMouseDown = PanelMouseDown
  192. end
  193. end
  194. object Timer1: TTimer
  195. Interval = 100
  196. OnTimer = Timer1Timer
  197. Left = 8
  198. Top = 160
  199. end
  200. object DropEmptySource1: TDropEmptySource
  201. DragTypes = [dtCopy, dtMove]
  202. OnDrop = DropEmptySource1Drop
  203. OnAfterDrop = DropEmptySource1AfterDrop
  204. OnGetData = DropEmptySource1GetData
  205. ImageIndex = 0
  206. ShowImage = False
  207. ImageHotSpotX = 16
  208. ImageHotSpotY = 16
  209. AllowAsyncTransfer = True
  210. Left = 40
  211. Top = 161
  212. end
  213. object DataFormatAdapterSource: TDataFormatAdapter
  214. DragDropComponent = DropEmptySource1
  215. DataFormatName = 'TVirtualFileStreamDataFormat'
  216. Enabled = True
  217. Left = 40
  218. Top = 193
  219. end
  220. end