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

📄 form1.frm

📁 E:StudyVBCodeStayTop.zip
💻 FRM
字号:
VERSION 4.00
Begin VB.Form Form1 
   Appearance      =   0  'Flat
   AutoRedraw      =   -1  'True
   BackColor       =   &H80000005&
   Caption         =   "Gradient Background Demonstration"
   ClientHeight    =   4230
   ClientLeft      =   2175
   ClientTop       =   1515
   ClientWidth     =   7695
   Height          =   4635
   Left            =   2115
   LinkTopic       =   "Form1"
   ScaleHeight     =   4230
   ScaleWidth      =   7695
   Top             =   1170
   Width           =   7815
   Begin Threed.SSPanel SSPanel1 
      Height          =   3135
      Left            =   480
      TabIndex        =   0
      Top             =   360
      Width           =   6735
      _Version        =   65536
      _ExtentX        =   11880
      _ExtentY        =   5530
      _StockProps     =   15
      BackColor       =   9991288
      Begin VB.CommandButton Command3 
         Caption         =   "Quit!"
         Height          =   315
         Left            =   5640
         TabIndex        =   19
         Top             =   2760
         Width           =   975
      End
      Begin VB.CommandButton Command2 
         Caption         =   "About..."
         Height          =   315
         Left            =   5640
         TabIndex        =   18
         Top             =   2400
         Width           =   975
      End
      Begin VB.CommandButton Command1 
         Caption         =   "Update form background"
         Height          =   375
         Left            =   2040
         TabIndex        =   13
         Top             =   2160
         Width           =   2055
      End
      Begin VB.CheckBox Check1 
         Caption         =   "Top to bottom"
         Height          =   255
         Left            =   240
         TabIndex        =   12
         Top             =   2280
         Value           =   1  'Checked
         Width           =   1335
      End
      Begin VB.PictureBox Picture4 
         BackColor       =   &H00000000&
         Height          =   375
         Left            =   5760
         ScaleHeight     =   315
         ScaleWidth      =   675
         TabIndex        =   11
         Top             =   1920
         Width           =   735
      End
      Begin VB.PictureBox Picture3 
         BackColor       =   &H00000000&
         Height          =   375
         Left            =   5760
         ScaleHeight     =   315
         ScaleWidth      =   675
         TabIndex        =   10
         Top             =   1320
         Width           =   735
      End
      Begin VB.PictureBox Picture2 
         BackColor       =   &H00000000&
         Height          =   375
         Left            =   5760
         ScaleHeight     =   315
         ScaleWidth      =   675
         TabIndex        =   9
         Top             =   720
         Width           =   735
      End
      Begin VB.PictureBox Picture1 
         BackColor       =   &H00000000&
         Height          =   375
         Left            =   5760
         ScaleHeight     =   315
         ScaleWidth      =   675
         TabIndex        =   8
         Top             =   120
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "0, 0, 255, 1"
         Height          =   255
         Left            =   3600
         TabIndex        =   14
         Top             =   2760
         Width           =   1455
      End
      Begin VB.Label Label8 
         Caption         =   "Syntax for current gradient is:"
         Height          =   255
         Left            =   240
         TabIndex        =   17
         Top             =   2760
         Width           =   2055
      End
      Begin VB.Label Label7 
         Caption         =   "Gradient"
         Height          =   255
         Left            =   2400
         TabIndex        =   16
         Top             =   2760
         Width           =   615
      End
      Begin VB.Label Label6 
         Caption         =   "Object,"
         BeginProperty Font 
            name            =   "MS Sans Serif"
            charset         =   0
            weight          =   400
            size            =   8.25
            underline       =   0   'False
            italic          =   -1  'True
            strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3000
         TabIndex        =   15
         Top             =   2760
         Width           =   615
      End
      Begin VB.Label Label4 
         Caption         =   "Composite"
         Height          =   255
         Left            =   4560
         TabIndex        =   7
         Top             =   2040
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "Blue = 255"
         Height          =   255
         Left            =   4560
         TabIndex        =   6
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "Green = 0"
         Height          =   255
         Left            =   4560
         TabIndex        =   5
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "Red = 0"
         Height          =   255
         Left            =   4560
         TabIndex        =   4
         Top             =   240
         Width           =   975
      End
      Begin ComctlLib.Slider Slider3 
         Height          =   495
         Left            =   120
         TabIndex        =   3
         Top             =   1440
         Width           =   4455
         _Version        =   65536
         _ExtentX        =   7858
         _ExtentY        =   873
         _StockProps     =   64
         Max             =   255
         SelStart        =   255
         TickFrequency   =   10
         Value           =   255
      End
      Begin ComctlLib.Slider Slider2 
         Height          =   495
         Left            =   120
         TabIndex        =   2
         Top             =   840
         Width           =   4455
         _Version        =   65536
         _ExtentX        =   7858
         _ExtentY        =   873
         _StockProps     =   64
         Max             =   255
         TickFrequency   =   10
      End
      Begin ComctlLib.Slider Slider1 
         Height          =   375
         Left            =   120
         TabIndex        =   1
         Top             =   240
         Width           =   4455
         _Version        =   65536
         _ExtentX        =   7858
         _ExtentY        =   661
         _StockProps     =   64
         LargeChange     =   10
         Max             =   255
         TickFrequency   =   10
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False

Private Sub Check1_Click()
    Gradient picture1, Slider1.Value, 0, 0, Check1.Value
    Gradient Picture2, 0, Slider2.Value, 0, Check1.Value
    Gradient Picture3, 0, 0, Slider3.Value, Check1.Value
    Gradient Picture4, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
    Label5.Caption = CStr(Slider1.Value) + ", " + CStr(Slider2.Value) + ", " + CStr(Slider3.Value) + ", " + CStr(Check1.Value)
End Sub

Private Sub Command1_Click()
    Gradient Form1, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
End Sub

Private Sub Command2_Click()
    Form2.Show 1
End Sub

Private Sub Command3_Click()
    Unload Form2
    Unload Form1
End Sub


Private Sub Form_Resize()
    Gradient Me, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
    'SSPanel1.Left = Form1.Width / 2 - SSPanel1.Width / 2
    'SSPanel1.Top = Form1.Height / 2 - SSPanel1.Height / 2
End Sub


Private Sub Picture3_Paint()
    Gradient Picture3, 0, 0, 255, 1
    Gradient Picture4, 0, 0, 255, 1
End Sub






Private Sub Slider1_Scroll()
    Label1.Caption = "Red = " + CStr(Slider1.Value)
    Gradient picture1, Slider1.Value, 0, 0, Check1.Value
    Gradient Picture4, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
    Label5.Caption = CStr(Slider1.Value) + ", " + CStr(Slider2.Value) + ", " + CStr(Slider3.Value) + ", " + CStr(Check1.Value)
End Sub


Private Sub Slider2_Scroll()
    Label2.Caption = "Green = " + CStr(Slider2.Value)
    Gradient Picture2, 0, Slider2.Value, 0, Check1.Value
    Gradient Picture4, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
    Label5.Caption = CStr(Slider1.Value) + ", " + CStr(Slider2.Value) + ", " + CStr(Slider3.Value) + ", " + CStr(Check1.Value)
End Sub


Private Sub Slider3_Scroll()
    Label3.Caption = "Blue = " + CStr(Slider3.Value)
    Gradient Picture3, 0, 0, Slider3.Value, Check1.Value
    Gradient Picture4, Slider1.Value, Slider2.Value, Slider3.Value, Check1.Value
    Label5.Caption = CStr(Slider1.Value) + ", " + CStr(Slider2.Value) + ", " + CStr(Slider3.Value) + ", " + CStr(Check1.Value)
End Sub


⌨️ 快捷键说明

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