home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / pixelsgn / pixelbrd.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-24  |  3.6 KB  |  124 lines

  1. VERSION 2.00
  2. Begin Form frmPixelBoard 
  3.    BorderStyle     =   1  'Fixed Single
  4.    ClientHeight    =   735
  5.    ClientLeft      =   1290
  6.    ClientTop       =   3060
  7.    ClientWidth     =   7035
  8.    ControlBox      =   0   'False
  9.    Height          =   1170
  10.    Icon            =   PIXELBRD.FRX:0000
  11.    Left            =   1215
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   735
  16.    ScaleWidth      =   7035
  17.    Top             =   2700
  18.    Width           =   7185
  19.    Begin Timer ScrollImage 
  20.       Enabled         =   0   'False
  21.       Interval        =   10
  22.       Left            =   2925
  23.       Top             =   1500
  24.    End
  25.    Begin PictureClip picChar 
  26.       Cols            =   93
  27.       Location        =   "25380,450,1485,-15"
  28.       Picture         =   PIXELBRD.FRX:0302
  29.    End
  30.    Begin TextBox txtMessage 
  31.       Height          =   375
  32.       Left            =   525
  33.       TabIndex        =   3
  34.       Text            =   "PIXEL BOARD BY: DAMON BRODIE !!!"
  35.       Top             =   900
  36.       Width           =   2880
  37.    End
  38.    Begin SSPanel pnlBorder 
  39.       BevelInner      =   1  'Inset
  40.       BevelWidth      =   2
  41.       BorderWidth     =   5
  42.       Height          =   750
  43.       Left            =   0
  44.       TabIndex        =   0
  45.       Top             =   0
  46.       Width           =   7035
  47.       Begin SSPanel pnlWindow 
  48.          BevelOuter      =   0  'None
  49.          BevelWidth      =   2
  50.          BorderWidth     =   5
  51.          Height          =   465
  52.          Left            =   135
  53.          TabIndex        =   1
  54.          Top             =   135
  55.          Width           =   6750
  56.          Begin PictureBox picMessage 
  57.             AutoRedraw      =   -1  'True
  58.             BackColor       =   &H00000000&
  59.             Height          =   480
  60.             Left            =   30
  61.             ScaleHeight     =   30
  62.             ScaleMode       =   3  'Pixel
  63.             ScaleWidth      =   452
  64.             TabIndex        =   2
  65.             Top             =   0
  66.             Width           =   6810
  67.             Begin Image imgChar 
  68.                Height          =   435
  69.                Index           =   1
  70.                Left            =   675
  71.                Top             =   0
  72.                Width           =   270
  73.             End
  74.          End
  75.       End
  76.    End
  77. Option Explicit
  78. ' Pixel Board 1.0
  79. ' September 24, 1994
  80. ' Visual Basic 3.0 Prof.
  81. ' By: Damon Brodie
  82. ' dbrodie@nbnet.nb.ca
  83. ' email me with any suggestions you have!!
  84. Dim PixelX As Integer
  85. Dim PixelY As Integer
  86. Dim ReturnToStart As Long
  87. Sub FixMessage (Mess$)
  88. ' Put spaces on either side of message so that it scrolls on and off.
  89. Mess$ = Space(25) + Trim(Mess$) + Space(25)
  90. End Sub
  91. Sub Form_Load ()
  92. Dim Temp$
  93. PixelX = Screen.TwipsPerPixelX
  94. PixelY = Screen.TwipsPerPixelY
  95. Temp$ = txtMessage.Text
  96. FixMessage Temp$
  97. InitImages Temp$
  98. ScrollImage.Enabled = True
  99. End Sub
  100. Sub imgChar_Click (Index As Integer)
  101. End Sub
  102. Sub InitImages (Mess$)
  103. Dim t As Integer
  104. Dim LeftLoc  As Long
  105. LeftLoc = 0
  106. picMessage.Top = 0
  107. picMessage.Width = (imgChar(1).Width * PixelX) * Len(Mess$)
  108. ReturnToStart = -((Len(Mess$) - 25) * imgChar(1).Width) * PixelX
  109. For t = 2 To Len(Mess$)
  110.    Load imgChar(t)
  111. For t = 1 To Len(Mess$)
  112.    imgChar(t).Left = LeftLoc
  113.    imgChar(t).Top = 0
  114.    imgChar(t).Picture = picChar.GraphicCell(Asc(Mid(Mess$, t, 1)) - 32)
  115.    imgChar(t).Visible = True
  116.    LeftLoc = LeftLoc + 18
  117. End Sub
  118. Sub ScrollImage_Timer ()
  119. picMessage.Left = picMessage.Left - 3 * PixelX
  120. If picMessage.Left < ReturnToStart Then
  121.    picMessage.Left = 0
  122. End If
  123. End Sub
  124.