当前位置: 开源爱好者 » 编程教程 » VB教程 » 正文

VB模拟调整Windows“显示”属性

 这是个Windows显示属性模拟程序,模拟Windows7之前的系统,比如XP Win2000的“显示”属性设置面板:

VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1 
   Caption         =   "显示属性"
   ClientHeight    =   5280
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5865
   LinkTopic       =   "Form1"
   ScaleHeight     =   5280
   ScaleWidth      =   5865
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame3 
      Height          =   1815
      Left            =   2760
      TabIndex        =   6
      Top             =   2760
      Width           =   2055
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   360
         TabIndex        =   10
         Text            =   "  平  铺"
         Top             =   600
         Width           =   1455
      End
      Begin VB.CommandButton Command5 
         Caption         =   "图 案"
         Height          =   375
         Left            =   1080
         TabIndex        =   8
         Top             =   1320
         Width           =   855
      End
      Begin VB.CommandButton Command4 
         Caption         =   "设 置"
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   1320
         Width           =   855
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "取消"
      Height          =   375
      Left            =   4080
      TabIndex        =   5
      Top             =   4800
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "应用"
      Height          =   375
      Left            =   3240
      TabIndex        =   4
      Top             =   4800
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   2400
      TabIndex        =   3
      Top             =   4800
      Width           =   855
   End
   Begin VB.Frame Frame2 
      Height          =   1815
      Left            =   240
      TabIndex        =   2
      Top             =   2760
      Width           =   2415
      Begin VB.ListBox List1 
         Height          =   1140
         Left            =   240
         TabIndex        =   9
         Top             =   360
         Width           =   1935
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2175
      Left            =   240
      TabIndex        =   1
      Top             =   480
      Width           =   4815
      Begin VB.Image Image1 
         Height          =   1815
         Left            =   1200
         Picture         =   "Form1.frx":0000
         Stretch         =   -1  'True
         Top             =   240
         Width           =   2055
      End
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   4575
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5415
      _ExtentX        =   9551
      _ExtentY        =   8070
      MultiRow        =   -1  'True
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   6
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "背  景"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "屏幕保护程序"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "外  观"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "效  果"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab5 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "Web"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab6 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "设  置"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
MsgBox "  对不起,本实例主要用于介绍“TabStrip1”控件的用法。有关深层次的屏幕设置,本例不作探讨。"
End Sub
Private Sub Command2_Click()
MsgBox "  对不起,本实例主要用于介绍“TabStrip1”控件的用法。有关深层次的屏幕设置,本例不作探讨。"
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
MsgBox "  对不起,本实例主要用于介绍“TabStrip1”控件的用法。有关深层次的屏幕设置,本例不作探讨。"
End Sub
Private Sub Command5_Click()
MsgBox "  对不起,本实例主要用于介绍“TabStrip1”控件的用法。有关深层次的屏幕设置,本例不作探讨。"
End Sub
Private Sub Form_Load()
List1.AddItem "(无)"
List1.AddItem "Bricks"
List1.AddItem "Buttons"
List1.AddItem "Cargo net"
List1.AddItem "Circuits"
List1.AddItem "Title"
List1.AddItem "Draw mat"
List1.AddItem "Red Blocks"
List1.AddItem "Plus!"
List1.AddItem "Windows98"
List1.AddItem "安装程序"
Combo1.AddItem "  平  铺"
Combo1.AddItem "  拉  伸"
Combo1.AddItem "  居  中"
Command4.Caption = "设 置"
Command5.Caption = "图 案"
End Sub
Private Sub TabStrip1_Click()
Select Case TabStrip1.SelectedItem.Index
Case 1
List1.Clear
List1.AddItem "(无)"
List1.AddItem "Bricks"
List1.AddItem "Buttons"
List1.AddItem "Cargo net"
List1.AddItem "Circuits"
List1.AddItem "Title"
List1.AddItem "Draw mat"
List1.AddItem "Red Blocks"
List1.AddItem "Plus!"
List1.AddItem "Windows98"
List1.AddItem "安装程序"
Combo1.Clear
Combo1.Text = "  平  铺"
Combo1.AddItem "  平  铺"
Combo1.AddItem "  拉  伸"
Combo1.AddItem "  居  中"
Command4.Caption = "设 置"
Command5.Caption = "图 案"
Case 2
List1.Clear
List1.AddItem "滚动字幕"
List1.AddItem "三维文字"
List1.AddItem "三维迷宫"
List1.AddItem "飞行的Windows"
List1.AddItem "三维变形物"
List1.AddItem "黄金时代"
List1.AddItem "黑屏"
List1.AddItem "科学"
List1.AddItem "危险动物"
List1.AddItem "海底世界"
List1.AddItem "运动"
Combo1.Clear
Combo1.Text = " 1分钟"
Combo1.AddItem " 1分钟"
Combo1.AddItem " 3分钟"
Combo1.AddItem " 10分钟"
Command4.Caption = "设 置"
Command5.Caption = "预 览"
End Select
End Sub

CopyRight 2018© 开源爱好者 All Rights Reserved 豫ICP备16030607号 隐私声明 网站地图