⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmarquee.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Object = "{D6EEA3C0-6216-11CF-BE62-0080C72EDD2D}#1.0#0"; "MARQUEE.OCX"
Begin VB.Form frmMarquee 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Image Marquee"
   ClientHeight    =   4605
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7335
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4605
   ScaleWidth      =   7335
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtZoom 
      Height          =   285
      Left            =   3960
      TabIndex        =   12
      Top             =   3600
      Width           =   1575
   End
   Begin VB.CommandButton cmdZoom 
      Caption         =   "Set Zoom %"
      Height          =   285
      Left            =   5640
      TabIndex        =   11
      Top             =   3600
      Width           =   1695
   End
   Begin VB.ComboBox cboYStyle 
      Height          =   315
      Left            =   5640
      TabIndex        =   8
      Text            =   "Circular"
      Top             =   4320
      Width           =   1695
   End
   Begin VB.ComboBox cboXStyle 
      Height          =   315
      Left            =   5640
      TabIndex        =   7
      Text            =   "Circular"
      Top             =   3960
      Width           =   1695
   End
   Begin VB.CommandButton cmdY 
      Caption         =   "Set Y Change"
      Height          =   285
      Left            =   1680
      TabIndex        =   6
      Top             =   4320
      Width           =   1695
   End
   Begin VB.CommandButton cmdX 
      Caption         =   "Set X Change"
      Height          =   285
      Left            =   1680
      TabIndex        =   5
      Top             =   3960
      Width           =   1695
   End
   Begin VB.CommandButton cmdDelay 
      Caption         =   "Set Delay (ms)"
      Height          =   285
      Left            =   1680
      TabIndex        =   4
      Top             =   3600
      Width           =   1695
   End
   Begin VB.TextBox txtY 
      Height          =   285
      Left            =   0
      TabIndex        =   3
      Top             =   4320
      Width           =   1575
   End
   Begin VB.TextBox txtX 
      Height          =   285
      Left            =   0
      TabIndex        =   2
      Top             =   3960
      Width           =   1575
   End
   Begin VB.TextBox txtDelay 
      Height          =   285
      Left            =   0
      TabIndex        =   1
      Top             =   3600
      Width           =   1575
   End
   Begin MarqueeObjectsCtl.Marquee Marquee1 
      Height          =   3495
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7335
      _ExtentX        =   12938
      _ExtentY        =   6165
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "Select Y Scroll Style"
      Height          =   255
      Left            =   4080
      TabIndex        =   10
      Top             =   4380
      Width           =   1455
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "Select X Scroll Style"
      Height          =   255
      Left            =   3960
      TabIndex        =   9
      Top             =   4020
      Width           =   1575
   End
End
Attribute VB_Name = "frmMarquee"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 20.13
' Using the Marquee Control to scroll an image
Option Explicit

Private Sub Form_Load()
   Marquee1.ScrollDelay = 25
   Marquee1.ScrollPixelsX = 1
   Marquee1.ScrollPixelsY = 0
   Marquee1.WidthOfPage = 180
   
   Call Marquee1.insertURL(0, "c:\images\deitel0.gif")
   
   Call cboXStyle.AddItem("Circular")
   Call cboXStyle.AddItem("Bounce")
   Call cboYStyle.AddItem("Circular")
   Call cboYStyle.AddItem("Bounce")
   txtDelay.Text = Str$(Marquee1.ScrollDelay)
   txtX.Text = Str$(Marquee1.ScrollPixelsX)
   txtY.Text = Str$(Marquee1.ScrollPixelsY)
   txtZoom.Text = Str$(Marquee1.Zoom)
End Sub

Private Sub cmdX_Click()
   Marquee1.ScrollPixelsX = CInt(txtX.Text)
End Sub

Private Sub cmdY_Click()
   Marquee1.ScrollPixelsY = CInt(txtY.Text)
End Sub

Private Sub cmdDelay_Click()
   Marquee1.ScrollDelay = CInt(txtDelay.Text)
End Sub

Private Sub cmdZoom_Click()
   Marquee1.Zoom = CInt(txtZoom.Text)
End Sub

Private Sub cboXStyle_Click()
   Marquee1.ScrollStyleX = cboXStyle.Text
End Sub

Private Sub cboYStyle_Click()
   Marquee1.ScrollStyleY = cboYStyle.Text
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -