home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "*\AScrlImg.vbp"
- Begin VB.Form TestForm
- BorderStyle = 4 'Fixed ToolWindow
- Caption = "Scrolling ImageBox"
- ClientHeight = 4125
- ClientLeft = 45
- ClientTop = 285
- ClientWidth = 5385
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4125
- ScaleWidth = 5385
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin ScrollingImage.ScrollImgBox ScrollImgBox1
- Height = 2535
- Left = 120
- TabIndex = 10
- Top = 720
- Width = 3615
- _ExtentX = 6376
- _ExtentY = 4471
- PictureWidth = 498
- PictureHeight = 226
- Picture = "TestForm.frx":0000
- End
- Begin VB.CommandButton Command3
- Caption = "Show Position"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3900
- TabIndex = 7
- Top = 2745
- Width = 1395
- End
- Begin VB.CommandButton Command2
- Caption = "Move Down"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3900
- TabIndex = 1
- Top = 3660
- Width = 1395
- End
- Begin VB.CommandButton Command1
- Caption = "Move Right"
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3900
- TabIndex = 0
- Top = 3195
- Width = 1395
- End
- Begin VB.Label Label7
- Caption = "Image Segment"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 150
- TabIndex = 9
- Top = 3360
- Width = 1650
- End
- Begin VB.Label Label6
- Caption = "Image Dimensions"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 195
- TabIndex = 8
- Top = 15
- Width = 2325
- End
- Begin VB.Label Label5
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 1860
- TabIndex = 6
- Top = 3690
- Width = 1530
- End
- Begin VB.Label Label4
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 165
- TabIndex = 5
- Top = 3690
- Width = 1530
- End
- Begin VB.Label Label3
- BeginProperty Font
- Name = "Tahoma"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 225
- TabIndex = 4
- Top = 3720
- Width = 1200
- End
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 1890
- TabIndex = 3
- Top = 330
- Width = 1530
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- Name = "Tahoma"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 300
- Left = 180
- TabIndex = 2
- Top = 330
- Width = 1530
- End
- Attribute VB_Name = "TestForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim X As Integer, Y As Integer
- Private Sub Command1_Click()
- X = X + 5
- ScrollImgBox1.ScrollTo (X), (Y)
- End Sub
- Private Sub Command2_Click()
- Y = Y + 5
- ScrollImgBox1.ScrollTo (X), (Y)
- End Sub
- Private Sub Command3_Click()
- Dim statusMsg As String
- statusMsg = "The image's dimensions are: " & ScrollImgBox1.PictureWidth & " by " & ScrollImgBox1.PictureHeight & vbCrLf
- statusMsg = statusMsg & "Its visible section starts at X = " & ScrollImgBox1.XPosition & ", Y = " & ScrollImgBox1.YPosition
- MsgBox statusMsg
- End Sub
- Private Sub Form_Load()
- Label1.Caption = "Width: " & ScrollImgBox1.PictureWidth
- Label2.Caption = "Height: " & ScrollImgBox1.PictureHeight
- End Sub
- Private Sub ScrollImgbox1_ChangeX(X As Integer)
- Label4.Caption = "X at: " & X
- End Sub
- Private Sub ScrollImgbox1_ChangeY(Y As Integer)
- Label5.Caption = "Y at: " & Y
- End Sub
- Private Sub ScrollImgBox1_Click()
- MsgBox "I was clicked"
- End Sub
- Private Sub ScrollImgbox1_ScrollX(X As Integer)
- Label4.Caption = "X at: " & X
- End Sub
- Private Sub ScrollImgbox1_ScrollY(Y As Integer)
- Label5.Caption = "Y at: " & Y
- End Sub
-