home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / prog / mlst43.arj / SCROLL.FRM < prev    next >
Text File  |  1994-04-17  |  3KB  |  105 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1740
  5.    ClientLeft      =   1392
  6.    ClientTop       =   1608
  7.    ClientWidth     =   6036
  8.    Height          =   2160
  9.    Left            =   1344
  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.       RiseColor       =   &H00FFFFFF&
  51.       SelectMode      =   0  'Normal
  52.       SortColumn      =   0
  53.       Sorted          =   0   'False
  54.       StringCompare   =   0  'Case Sensitive
  55.       TabIndex        =   0
  56.       Top             =   336
  57.       Version         =   "04.20"
  58.       VerticalGrids   =   0   'False
  59.       VirtualMsgZone  =   0
  60.       Width           =   5628
  61.    End
  62. End
  63. Dim scrOffset As Long
  64. Const MM_TWIPS = 6
  65.  
  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.  
  69. Sub Form_Load ()
  70.  
  71.   MList1.ItemLength(1) = 2000
  72.   MList1.ItemLength(2) = 2000
  73.   MList1.ItemLength(3) = 2000
  74.   MList1.ItemLength(4) = 2000
  75.   MList1.ItemLength(5) = 2000
  76.  
  77.   MList1.SetHzScroll = 1
  78.  
  79.   For I = 0 To 15
  80.     MList1.AddItem Str$(I) + Chr$(9) + "Value:" + Str$(I) + Chr$(9) + "Information " + Str$(I) + Chr$(9) + "Next To Last" + Chr$(9) + "Last"
  81.   Next I
  82.  
  83. End Sub
  84.  
  85. Sub MList1_ScrollMessage (Offset As Integer)
  86.  
  87.   scrOffset = Offset
  88.   Debug.Print "Scroll offset:" + Str$(scrOffset)
  89.   Picture1.Refresh
  90.  
  91. End Sub
  92.  
  93. Sub Picture1_Paint ()
  94.  
  95.   Dim retval As Integer, Y As Integer
  96.   Y = 0
  97.  
  98.   For I = 1 To 5
  99.     retval = TextOut(Picture1.hDC, -scrOffset + Y, 0, "Column" + Str$(I), 8)
  100.     Y = Y + 165 + I Mod 2
  101.   Next I
  102.  
  103. End Sub
  104.  
  105.