home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Grid-X9_(_2159668102009.psc / Main / Click_Tambahan.bas < prev    next >
BASIC Source File  |  2008-07-21  |  15KB  |  327 lines

  1. Attribute VB_Name = "Click_Tambahan"
  2.  
  3. Sub ClickProses(MeTag As String, TXPointerIndex As Long, TYPointerIndex As Long)
  4.     'Form3.ClikData MeTag, TXPointerIndex, TYPointerIndex
  5. End Sub
  6.  
  7.  
  8. 'Sampah
  9. 'Private Sub DrawList(ByVal LIndex As Integer, TmpCutGridX As Integer, TmpCutGridY As Integer, ObjMe As Object, SizeGridList As Integer, CountGridList As Integer)
  10. Private Sub DrawList(TmpCutGridX As Integer, TmpCutGridY As Integer, ObjMe As Object, Optional IndexLList As Integer, Optional MouseDowns As Boolean, Optional CloseBar As Boolean, Optional SubCloseBar As Boolean)       ', SizeGridList As Integer, CountGridList As Integer)
  11. Dim tmpSizeGridList As Integer
  12. Dim XRangeList As Integer
  13. Dim UIndexs As Integer, LIndex As Integer
  14. Dim CountGridList As Integer, SizeGridList As Integer
  15. Dim Y As Single
  16. Dim OverLos As Integer
  17. Dim FormatD As String
  18. Dim YyY As Integer
  19. Dim nY As Single
  20. Dim ColorHead As Long
  21. Dim tmpCountContGList As Integer, tmpGLRange As Integer
  22. Dim CountList As Integer, LoopCountList As Integer, LoopLine As Integer
  23. Dim tmpGLShowCount As Integer
  24. Dim Aab As Integer
  25.  
  26. Cx = GridX(TmpCutGridX).GridLeft + GridX(TmpCutGridX).GridWidth - 0
  27. Cy = GridY(TmpCutGridY).GridTop + GridY(TmpCutGridY).GridHeight
  28.  
  29.  
  30. GridXYData(3, 100).GridSubType.GLFrmtStly = "?pt.vis|1 ?pt.x2|150?"
  31. GridXYData(0, 150).GridSubType.GLFrmtStly = "" '?pt.vis|1 ?pt.x2|150 ?pt.full|1 ?" '?pt.x2|50 ?pt.full|0 ?pl.txt.x1|10 ?"
  32. GridXYData(2, 100).GridSubType.GLFrmtStly = "?pt.vis|1 ?pt.x2|150 ?lst.txt.x1|10 ?"
  33.  
  34. FormatD = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLFrmtStly
  35. LoadFormatPT FormatD
  36. If ListPT.PTVis = 0 Then ListPT.PTFull = 0
  37. If ListPT.PTX2 < 15 Then ListPT.PTVis = 0
  38.  
  39. tmpCountContGList = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1
  40. tmpGLShowCount = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLShowCount - 1
  41.  
  42. If tmpGLShowCount > -1 Then
  43. tmpCountContGList = tmpGLShowCount
  44. If tmpGLShowCount > GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1 Then
  45. tmpCountContGList = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1
  46. tmpGLShowCount = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1
  47. End If
  48. End If
  49.  
  50. Aab = 20
  51.  
  52. If tmpCountContGList = 0 Then CountList = GridY(TmpCutGridY).GridHeight - SellHeight_Def - 0 Else _
  53. CountList = ((GridY(TmpCutGridY).GridHeight - SellHeight_Def) \ (tmpCountContGList + 1))
  54. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLHeight <> 0 Then CountList = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLHeight
  55.  
  56. UIndexs = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLSubScrolIndex
  57.  
  58. If ListPT.PTVis = 1 Then
  59. If ListPT.PTFull = 1 Then ListPT.PTX2 = GridX(TmpCutGridX).GridWidth
  60.  
  61. Picture8.Picture = Nothing
  62. Picture8.Width = ListPT.PTX2 - 3
  63. Picture8.Height = CountList - 2
  64.  
  65. Picture8.PaintPicture Picture7.Picture, 7, 7, ListPT.PTX2 - 3 - 14, CountList - 2 - 14, 7 * 1 + 1, 7 * 1 + 1, 6, 6
  66. Picture8.PaintPicture Image8.Picture, 0, 0, ListPT.PTX2 - 3, , 7 * 1 + 1, 7 * 0 + 1, 6, 6
  67. Picture8.PaintPicture Picture7.Picture, ListPT.PTX2 - 6 - 3, 0, , CountList - 3, 7 * 2 + 1, 7 * 1 + 1, 6, 6
  68. Picture8.PaintPicture Picture7.Picture, 0, CountList - 6 - 2, ListPT.PTX2 - 3, , 7 * 1 + 1, 7 * 2 + 1, 6, 6
  69. Picture8.PaintPicture Picture7.Picture, 0, 0, , CountList - 2, 7 * 0 + 1, 7 * 1 + 1, 6, 6
  70. Picture8.PaintPicture Picture7.Picture, 0, 0, , , 7 * 0 + 1, 7 * 0 + 1, 6, 6
  71. Picture8.PaintPicture Picture7.Picture, ListPT.PTX2 - 6 - 3, 0, , , 7 * 2 + 1, 7 * 0 + 1, 6, 6
  72. Picture8.PaintPicture Picture7.Picture, ListPT.PTX2 - 6 - 3, CountList - 6 - 2, , , 7 * 2 + 1, 7 * 2 + 1, 6, 6
  73. Picture8.PaintPicture Picture7.Picture, 0, CountList - 6 - 2, , , 7 * 0 + 1, 7 * 2 + 1, 6, 6
  74. Picture8.Picture = Picture8.Image
  75. End If
  76.  
  77. For X = IndexLList To tmpCountContGList
  78. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLHeight = 0 Then OverLos = 0 Else _
  79. OverLos = SellHeight_Def + GridY(TmpCutGridY).GridTop + GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLHeight * (X + 1)
  80.  
  81. If tmpGLShowCount > -1 And tmpGLShowCount <> GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1 Then
  82. XRangeList = 15 * 2 + 2
  83. Else
  84. XRangeList = 15 + 2
  85. End If
  86.  
  87. SizeGridList = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLRange
  88. LIndex = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLScrolIndex
  89.  
  90. CountGridList = Int((CountList - Aab) / SizeGridList) + 0
  91. 'Update
  92. Dim ErrorX As Integer
  93. ErrorX = CountGridList - ((GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 0) - LIndex)
  94. If ErrorX > 0 Then
  95. LIndex = LIndex - ErrorX
  96. GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLScrolIndex = LIndex
  97. If LIndex < 0 Then
  98. LIndex = 0
  99. GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLScrolIndex = LIndex
  100. End If
  101. End If
  102.  
  103. 'Update
  104. If LIndex = -1 Then
  105. LIndex = 0
  106. GridXYData(XPointerIndex, YPointerIndex).GridSubType.ContGList(X + UIndexs).GLScrolIndex = LIndex
  107. End If
  108.  
  109. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 1 < CountGridList - 0 Then
  110. If tmpGLShowCount = -1 Or tmpGLShowCount = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1 Then
  111. XRangeList = 4
  112. Else
  113. XRangeList = 15 + 4
  114. End If
  115. End If
  116.  
  117. tmpGLRange = GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLRange
  118. LoopCountList = (CountList * (X + 1)) + ((GridY(TmpCutGridY).GridTop + SellHeight_Def))
  119. LoopLine = (Abs(LoopCountList - (GridY(TmpCutGridY).GridTop + SellHeight_Def + CountList))) + Aab ' 20
  120.  
  121. If tmpGLShowCount > -1 Then
  122. aXRangeList = 1
  123. Else
  124. aXRangeList = 0
  125. End If
  126.  
  127. If ListPT.PTVis = 1 Then 'Format PicThumb
  128. If ListPT.PTFull = 0 And GridX(TmpCutGridX).GridLeft + ListPT.PTX2 + 10 >= Cx - XRangeList + 2 Then
  129. TMPx2_PicThumb = 2
  130. GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).OpenThumb = False
  131. Else
  132. 'Line Thumb
  133. ObjMe.Line (GridX(TmpCutGridX).GridLeft + 2, _
  134. (GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine - 17)- _
  135. (GridX(TmpCutGridX).GridLeft + ListPT.PTX2 - 2, LoopCountList), 0, B
  136.  
  137. Picture1.PaintPicture Picture8.Picture, GridX(TmpCutGridX).GridLeft + 2, _
  138. (GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine - 17
  139.  
  140. GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).OpenThumb = True
  141. TMPx2_PicThumb = ListPT.PTX2
  142. End If
  143. Else
  144. TMPx2_PicThumb = 2
  145. End If
  146.  
  147. If ListPT.PTFull = 0 Then  'Update
  148. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.PointerListHead = X + UIndexs Then '&H00FF8080&
  149. Picture1.FontBold = True
  150. ColorHead = &HFFC0C0 'Color List Head Hit
  151. Else
  152. Picture1.FontBold = False
  153. ColorHead = &HFF8080 'Color List Head Default
  154. End If
  155. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 17 < Cy Then
  156. If (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 1) > Cy Then
  157. YyY = (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 1) - Cy
  158. Else
  159. YyY = 0
  160. End If
  161.  
  162. 'Line Back Head List
  163. ObjMe.Line (GridX(TmpCutGridX).GridLeft + TMPx2_PicThumb, _
  164. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 17)- _
  165. (Cx - (15 * aXRangeList) - 2, (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 1) - YyY), ColorHead, BF
  166.  
  167. 'Text Head List
  168. TextEffect ObjMe.hDC, GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCaption & vbCrLf & "LLLLL", _
  169. GridX(TmpCutGridX).GridLeft + 5 + TMPx2_PicThumb, _
  170. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - 14, _
  171. Cx - (15 * aXRangeList) - 2, _
  172. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine) - YyY, , GridXYData(TmpCutGridX, TmpCutGridY).GridSub.Alignment, 0
  173. End If
  174.  
  175. Command17.Visible = True
  176. For Y = 0 To GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 1
  177. If ListPT.PTFull <> 0 Then Exit For
  178. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLPointer = Y + LIndex Then
  179. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine > LoopCountList Then
  180. Rrrx = (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine) - LoopCountList
  181. Else
  182. Rrrx = 0
  183. End If
  184. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine - Rrrx > Cy Then
  185. Rrrx = (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine - Rrrx) - Cy
  186. End If
  187. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine < Cy Then
  188. ObjMe.Line (GridX(TmpCutGridX).GridLeft + TMPx2_PicThumb, _
  189. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine)- _
  190. (Cx - XRangeList + 2, ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine - Rrrx), &H8000000D, BF
  191. End If
  192. tmpColorGrid = vbWhite
  193. Else
  194. tmpColorGrid = 0
  195. End If
  196.  
  197.  
  198. tmpSizeGridList = SizeGridList
  199. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine > _
  200. LoopCountList Then
  201. tmpSizeGridList = Abs((CountList - Aab) - (CountGridList * SizeGridList)) 'LoopCountList
  202. End If
  203.  
  204. If Y + LIndex >= GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 0 Then
  205. Exit For 'Exit Sub
  206. End If
  207.  
  208. If OverLos > Cy Then
  209. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine + tmpSizeGridList > Cy Then
  210. tmpSizeGridList = (Cy) - (((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine)  'GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine + (CountGridList * SizeGridList) - Cy 'Abs((CountList - Aab) - (CountGridList * SizeGridList))
  211. End If
  212. End If
  213.  
  214. Picture1.FontBold = False
  215. TextEffect ObjMe.hDC, GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLText(Y + LIndex), _
  216. GridX(TmpCutGridX).GridLeft + 5 + TMPx2_PicThumb, _
  217. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine, _
  218. GridX(TmpCutGridX).GridLeft + GridX(TmpCutGridX).GridWidth - XRangeList, _
  219. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine + tmpSizeGridList, , GridXYData(TmpCutGridX, TmpCutGridY).GridSub.Alignment, tmpColorGrid
  220.  
  221. sd = 0
  222. 'If X > 0 Then sd = 0 '5
  223. If GridY(TmpCutGridY).GridTop + SellHeight_Def + (SizeGridList * (Y + 1) + LoopLine) > _
  224. LoopCountList Then
  225. Exit For
  226. End If
  227.  
  228.  
  229. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine > Cy Then
  230. YyY = ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine
  231. Else
  232. YyY = ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine
  233. End If
  234.  
  235. If ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine < Cy Then
  236. ObjMe.Line (GridX(TmpCutGridX).GridLeft + TMPx2_PicThumb, _
  237. ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 0))) + LoopLine)- _
  238. (Cx - XRangeList + 2, YyY), &HC0C0C0, B '&HC0C0C0
  239. End If
  240. 'If ...GLHeight <> 0 And ...... Then Exit For
  241. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.GLHeight <> 0 And ((GridY(TmpCutGridY).GridTop + SellHeight_Def) + (SizeGridList * (Y + 1))) + LoopLine > Cy Then Exit For
  242.  
  243. Next Y
  244.  
  245. 'Update
  246. If Y + LIndex >= GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 0 Then
  247. 'Exit For 'Exit Sub
  248. End If
  249.  
  250. If OverLos > Cy Then YyY = Cy Else YyY = LoopCountList
  251. If GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine < Cy Then 'MsgBox "O "
  252. ObjMe.Line (GridX(TmpCutGridX).GridLeft + TMPx2_PicThumb, _
  253. (GridY(TmpCutGridY).GridTop + SellHeight_Def) + LoopLine)- _
  254. (Cx - XRangeList + 2, YyY - 0), vbRed, B
  255. End If
  256.  
  257.  
  258. If GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - 1 > CountGridList - 1 Then
  259. 'Tengah
  260. If OverLos > Cy Then YyY = (CountList - Aab) - (LoopCountList - Cy) Else YyY = (CountList - Aab)
  261. If YyY > 0 Then
  262. ObjMe.PaintPicture Image3.Picture, Cx - XRangeList + 2, _
  263. GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine, , YyY, 14 * 1, , 14, 13
  264. End If
  265.  
  266. If CloseBar = False Then
  267. 'Dalam Tengah               ^ Nilai tambahan coba dikoreksi
  268. MovingY = ((CountList - Aab + 1) - (13 * 3)) / _
  269. (GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLCount - (CountGridList + 0))
  270.  
  271. List1.AddItem MovingY & "K-K " & X & " " & Y
  272. 'MsgBox GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X).GLCount - CountGridList
  273. 'Command17.Caption = ((GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine + 13) + (MovingY * GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLScrolIndex) + 0) - Cy
  274.  
  275. nY = (GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine + 13) + _
  276. (MovingY * GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.ContGList(X + UIndexs).GLScrolIndex)
  277.  
  278. If nY + 13 > Cy Then YyY = Cy - nY Else YyY = 13
  279. If YyY > 0 Then
  280. ObjMe.PaintPicture Image3.Picture, Cx - XRangeList + 2, _
  281. nY, , , 14 * 3, , 14, YyY
  282. End If
  283. End If
  284. If GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine + 13 > Cy Then YyY = (CountList - Aab) - (LoopCountList - Cy) Else YyY = 13
  285. If YyY > 0 Then
  286. ObjMe.PaintPicture Image3.Picture, Cx - XRangeList + 2, _
  287. GridY(TmpCutGridY).GridTop + SellHeight_Def + LoopLine, , , 14 * 0, , 14, YyY
  288. End If
  289. If OverLos > Cy Then YyY = 13 - (LoopCountList - Cy) Else YyY = 13
  290. If YyY > 0 Then
  291. ObjMe.PaintPicture Image3.Picture, Cx - XRangeList + 2, LoopCountList - 12, , , 14 * 2, , 14, YyY
  292. End If
  293.  
  294. 'Command17.Caption = "00000dfsf"
  295. End If
  296. End If
  297.  
  298. If MouseDowns = True Then Exit For
  299. If OverLos > Cy Then Exit For
  300. Next X
  301.  
  302. If tmpGLShowCount > -1 Then
  303.  
  304. ObjMe.PaintPicture Image3.Picture, Cx - 15, GridY(TmpCutGridY).GridTop + SellHeight_Def, , GridY(TmpCutGridY).GridHeight - SellHeight_Def, 14 * 1, 13 * 1, 14, 13
  305.  
  306.  
  307.  
  308. If SubCloseBar = False Then
  309. SubMovingYs = (GridY(TmpCutGridY).GridHeight - SellHeight_Def - (13 * 3)) / _
  310. ((GridXYData(TmpCutGridX, TmpCutGridY).GridSubType.CountContGList - 1) - tmpGLShowCount)
  311.  
  312. ObjMe.PaintPicture Image3.Picture, Cx - 15, _
  313. (GridY(TmpCutGridY).GridTop + SellHeight_Def + 0 + 13) + _
  314. (SubMovingYs * UIndexs), , , 14 * 3, 13 * 1, 14, 13
  315. List1.AddItem "OJ"
  316. End If
  317.  
  318. ObjMe.PaintPicture Image3.Picture, Cx - 15, GridY(TmpCutGridY).GridTop + SellHeight_Def, , , 14 * 0, , 14, 13
  319.  
  320. ObjMe.PaintPicture Image3.Picture, Cx - 15, Cy - 13, , , 14 * 2, , 14, 13
  321. End If
  322.  
  323. End Sub
  324.  
  325.  
  326.  
  327.