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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form form1 
   Caption         =   "图标显示状态的设置"
   ClientHeight    =   3915
   ClientLeft      =   3870
   ClientTop       =   1980
   ClientWidth     =   9825
   Icon            =   "form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   3915
   ScaleWidth      =   9825
   Begin VB.CommandButton Command7 
      Caption         =   "退出"
      Height          =   360
      Left            =   8445
      TabIndex        =   7
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command5 
      Caption         =   "图形"
      Height          =   360
      Left            =   5700
      TabIndex        =   6
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command6 
      Caption         =   "水印"
      Height          =   360
      Left            =   7065
      TabIndex        =   5
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   "选定模式"
      Height          =   360
      Left            =   4320
      TabIndex        =   4
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "霓虹灯"
      Height          =   360
      Left            =   2940
      TabIndex        =   3
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "灰度"
      Height          =   360
      Left            =   1560
      TabIndex        =   2
      Top             =   3420
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "常规模式"
      Height          =   360
      Left            =   165
      TabIndex        =   1
      Top             =   3420
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      Height          =   540
      Left            =   195
      ScaleHeight     =   540
      ScaleWidth      =   9270
      TabIndex        =   0
      Top             =   2745
      Visible         =   0   'False
      Width           =   9270
   End
   Begin ComctlLib.ImageList ilsIcons 
      Left            =   540
      Top             =   930
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   23
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":000C
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":0326
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":0640
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":095A
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":0C74
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":0F8E
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":12A8
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":15C2
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":18DC
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":1BF6
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":1F10
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":222A
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":2544
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":285E
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":2B78
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":2E92
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":31AC
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":34C6
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":37E0
            Key             =   ""
         EndProperty
         BeginProperty ListImage20 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":3AFA
            Key             =   ""
         EndProperty
         BeginProperty ListImage21 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":3E14
            Key             =   ""
         EndProperty
         BeginProperty ListImage22 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":412E
            Key             =   ""
         EndProperty
         BeginProperty ListImage23 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "form1.frx":4448
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim himl As Long
Dim hIcon As Long
Dim i As Long
Dim lR As Long
Dim hBr As Long
Dim lFlags As Long

Private Sub Command1_Click()
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  For i = 1 To ilsIcons.ListImages.Count     '获取图标列表
      hIcon = ImageList_GetIcon(himl, i - 1, 0)
      DrawIconEx Me.hdc, i * 25, 30, hIcon, 16, 16, 0, 0, DI_NORMAL  '设置常规模式
  Next i
End Sub

Private Sub Command2_Click()
  hBr = CreateSolidBrush(&HFF00&)
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  For i = 1 To ilsIcons.ListImages.Count    '获取图标列表
      hIcon = ImageList_GetIcon(himl, i - 1, 0)
      lR = DrawState(Me.hdc, hBr, 0, hIcon, 0, 25 * i, 60, 16, 16, DST_ICON Or DSS_DISABLED) '设置灰度模式
  Next i
  DeleteObject hBr
  DeleteObject ico
End Sub

Private Sub Command3_Click()
  hBr = CreateSolidBrush(&HFF00&)
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  For i = 1 To ilsIcons.ListImages.Count    '获取图标列表
      hIcon = ImageList_GetIcon(himl, i - 1, 0)
      lR = DrawState(Me.hdc, hBr, 0, hIcon, 0, 25 * i, 90, 16, 16, DST_ICON Or DSS_MONO)  '设置霓红灯模式
  Next i
   DeleteObject ico
End Sub

Private Sub Command4_Click()
  hBr = CreateSolidBrush(&HFF00&)
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  For i = 1 To ilsIcons.ListImages.Count   '获取图标列表
      lFlags = ILD_TRANSPARENT Or ILD_SELECTED
      hIcon = ImageList_GetIcon(himl, i - 1, 0)
      lR = ImageList_Draw(himl, i - 1, Me.hdc, 25 * i, 120, lFlags)   '设置选定模式
  Next i
  DeleteObject hBr
  DeleteObject ico
End Sub

Private Sub Command5_Click()
  hBr = CreateSolidBrush(&HFF00&)
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  lFlags = OVERLAYMASK
  For i = 1 To ilsIcons.ListImages.Count   '获取图标列表
      lR = ImageList_Draw(himl, i - 1, Me.hdc, 25 * i, 150, lFlags)   '设置图片模式
  Next i
  DeleteObject hBr
End Sub

Private Sub Command6_Click()
  Picture1.Visible = True
  hBr = CreateSolidBrush(&HFF00&)
  ilsIcons.ListImages(1).Draw 0, 0, 0
  himl = ilsIcons.hImageList
  lFlags = ILD_TRANSPARENT Or ILD_SELECTED
  For i = 1 To ilsIcons.ListImages.Count   '获取图标列表
      hIcon = ImageList_GetIcon(himl, i - 1, 0)
      DeleteObject hIcon
      lFlags = ILD_TRANSPARENT Or ILD_SELECTED
      lR = ImageList_DrawEx(himl, i - 1, Picture1.hdc, (i - 1) * 25, 6, 0, 0, CLR_NONE, GetSysColor(COLOR_WINDOW), lFlags)   '设置水印模式
  Next i
  DeleteObject hBr
  DeleteObject ico
  Picture1.Refresh
End Sub

Private Sub Command7_Click()
  End
End Sub

⌨️ 快捷键说明

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