home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / MLIST_45 / SCROLL.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-04-25  |  3.3 KB  |  95 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1740
  5.    ClientLeft      =   1380
  6.    ClientTop       =   1608
  7.    ClientWidth     =   6036
  8.    Height          =   2160
  9.    Left            =   1332
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1740
  12.    ScaleWidth      =   6036
  13.    Top             =   1236
  14.    Width           =   6132
  15.    Begin PictureBox Picture1 
  16.       BackColor       =   &H00C0C0C0&
  17.       Height          =   204
  18.       Left            =   96
  19.       ScaleHeight     =   180
  20.       ScaleWidth      =   5604
  21.       TabIndex        =   1
  22.       Top             =   96
  23.       Width           =   5628
  24.    End
  25.    Begin MListBox MList1 
  26.       Alignment       =   0  'None
  27.       AllowFocusRect  =   -1  'True
  28.       BorderStyle     =   0  'Normal
  29.       CheckColor      =   &H00000000&
  30.       CheckStyle      =   0  'Cross Style
  31.       DrawRegions     =   5
  32.       EnableVirtualMsgs=   0   'False
  33.       ExtendedSelect  =   0   'False
  34.       FallColor       =   &H00808080&
  35.       FindDirection   =   0  'Forward
  36.       GridColor       =   &H00000000&
  37.       GridStyle       =   0  'Solid
  38.       Height          =   1176
  39.       HiliteBackColor =   &H00000000&
  40.       HiliteForeColor =   &H00000000&
  41.       HorizontalGrids =   0   'False
  42.       ImageRegion     =   0
  43.       ImageType       =   0  'None
  44.       ItemHeight      =   195
  45.       ItemWidth       =   1560
  46.       Left            =   96
  47.       MaskingColor    =   &H00FFFFFF&
  48.       MultiColumn     =   0   'False
  49.       MultiSelect     =   0   'False
  50.       NoIntegralHeight=   0   'False
  51.       OwnerDraw       =   0   'False
  52.       RiseColor       =   &H00FFFFFF&
  53.       SelectMode      =   0  'Normal
  54.       SortColumn      =   0
  55.       Sorted          =   0   'False
  56.       StringCompare   =   0  'Case Sensitive
  57.       TabIndex        =   0
  58.       Top             =   336
  59.       Version         =   "04.20"
  60.       VerticalGrids   =   0   'False
  61.       VirtualMsgZone  =   0
  62.       Width           =   5628
  63.    End
  64. Dim scrOffset As Long
  65. Const MM_TWIPS = 6
  66. Declare Function TextOut Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal lpString As String, ByVal nCount As Integer) As Integer
  67. Declare Function SetMapMode Lib "GDI" (ByVal hDC As Integer, ByVal nMapMode As Integer) As Integer
  68. Sub Form_Load ()
  69.   MList1.ItemLength(1) = 2000
  70.   MList1.ItemLength(2) = 2000
  71.   MList1.ItemLength(3) = 2000
  72.   MList1.ItemLength(4) = 2000
  73.   MList1.ItemLength(5) = 2000
  74.   MList1.SetHzScroll = 1
  75.   For I = 0 To 15
  76.     MList1.AddItem Str$(I) + Chr$(9) + "Value:" + Str$(I) + Chr$(9) + "Information " + Str$(I) + Chr$(9) + "Next To Last" + Chr$(9) + "Last"
  77.   Next I
  78. End Sub
  79. Sub MList1_DrawItem (ListIndex As Integer, ItemAction As Integer, ItemState As Integer, ItemDC As Integer, ItemLeft As Integer, ItemTop As Integer, ItmeRight As Integer, ItemBottom As Integer, ItemText As String)
  80.   retval = TextOut(ItemDC, ItemLeft, ItemTop, ItemText, Len(ItemText))
  81. End Sub
  82. Sub MList1_ScrollMessage (Offset As Integer)
  83.   scrOffset = Offset
  84.   Debug.Print "Scroll offset:" + Str$(scrOffset)
  85.   Picture1.Refresh
  86. End Sub
  87. Sub Picture1_Paint ()
  88.   Dim retval As Integer, Y As Integer
  89.   Y = 0
  90.   For I = 1 To 5
  91.     retval = TextOut(Picture1.hDC, -scrOffset + Y, 0, "Column" + Str$(I), 8)
  92.     Y = Y + 165 + I Mod 2
  93.   Next I
  94. End Sub
  95.