home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / imagebox / vidform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-07-10  |  2.6 KB  |  90 lines

  1. VERSION 5.00
  2. Object = "*\AScrlImg.vbp"
  3. Begin VB.Form VideoForm 
  4.    Caption         =   "Scrolling Image Video"
  5.    ClientHeight    =   2865
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4890
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2865
  11.    ScaleWidth      =   4890
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin ScrollingImage.ScrollImgBox ScrollImgBox1 
  14.       Height          =   2055
  15.       Left            =   120
  16.       TabIndex        =   2
  17.       Top             =   120
  18.       Width           =   4575
  19.       _ExtentX        =   8070
  20.       _ExtentY        =   3625
  21.       PictureWidth    =   498
  22.       PictureHeight   =   226
  23.       Picture         =   "VidForm.frx":0000
  24.    End
  25.    Begin VB.CommandButton Command2 
  26.       Caption         =   "Load Image"
  27.       BeginProperty Font 
  28.          Name            =   "Verdana"
  29.          Size            =   9.75
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   420
  37.       Left            =   135
  38.       TabIndex        =   0
  39.       Top             =   2340
  40.       Width           =   1575
  41.    End
  42.    Begin VB.CommandButton Command1 
  43.       Caption         =   "Scroll Image"
  44.       BeginProperty Font 
  45.          Name            =   "MS Sans Serif"
  46.          Size            =   9.75
  47.          Charset         =   0
  48.          Weight          =   400
  49.          Underline       =   0   'False
  50.          Italic          =   0   'False
  51.          Strikethrough   =   0   'False
  52.       EndProperty
  53.       Height          =   405
  54.       Left            =   3195
  55.       TabIndex        =   1
  56.       Top             =   2340
  57.       Width           =   1560
  58.    End
  59. Attribute VB_Name = "VideoForm"
  60. Attribute VB_GlobalNameSpace = False
  61. Attribute VB_Creatable = False
  62. Attribute VB_PredeclaredId = True
  63. Attribute VB_Exposed = False
  64. Option Explicit
  65. Private Sub Command1_Click()
  66. Dim i As Integer
  67. Dim j As Integer
  68. Dim VWidth As Integer
  69.     VWidth = ScrollImgBox1.PictureWidth - ScrollImgBox1.VisibleWidth
  70.     For i = 0 To 90
  71.         ScrollImgBox1.ScrollTo 0, i
  72.         DoEvents
  73.     Next
  74.     For i = 0 To VWidth
  75.         ScrollImgBox1.ScrollTo i, 90
  76.         DoEvents
  77.     Next
  78.     For i = 90 To 40 Step -1
  79.         ScrollImgBox1.ScrollTo VWidth, i
  80.         DoEvents
  81.     Next
  82.     For i = VWidth To 0 Step -1
  83.         ScrollImgBox1.ScrollTo i, 40
  84.         DoEvents
  85.     Next
  86. End Sub
  87. Private Sub Command2_Click()
  88.     ScrollImgBox1.PictureFromURL = "http://127.0.0.1/nysky.gif"
  89. End Sub
  90.