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

📄 config.frm

📁 大量优秀的vb编程
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Configuration 
   Caption         =   "屏幕保护程序"
   ClientHeight    =   4176
   ClientLeft      =   4620
   ClientTop       =   2424
   ClientWidth     =   3648
   Icon            =   "Config.frx":0000
   LinkTopic       =   "Form2"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4176
   ScaleWidth      =   3648
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   2088
      Index           =   0
      Left            =   4000
      Picture         =   "Config.frx":000C
      ScaleHeight     =   174
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   189
      TabIndex        =   7
      Top             =   45
      Visible         =   0   'False
      Width           =   2268
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   2088
      Index           =   1
      Left            =   4000
      Picture         =   "Config.frx":41CE
      ScaleHeight     =   174
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   189
      TabIndex        =   6
      Top             =   -15
      Visible         =   0   'False
      Width           =   2268
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   2172
      Index           =   2
      Left            =   4000
      ScaleHeight     =   181
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   199
      TabIndex        =   5
      Top             =   1020
      Visible         =   0   'False
      Width           =   2388
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   1356
      Left            =   900
      ScaleHeight     =   1332
      ScaleWidth      =   1824
      TabIndex        =   4
      Top             =   324
      Width           =   1848
   End
   Begin VB.Timer Timer1 
      Interval        =   400
      Left            =   3204
      Top             =   3468
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "退出程序"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   432
      Left            =   1200
      TabIndex        =   3
      Top             =   3480
      Width           =   1200
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   252
      Left            =   615
      Max             =   9
      Min             =   1
      TabIndex        =   8
      Top             =   3000
      Value           =   5
      Width           =   2385
   End
   Begin VB.Image Image1 
      Height          =   2175
      Left            =   675
      Top             =   105
      Width           =   2385
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "大"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   2
      Left            =   2595
      TabIndex        =   2
      Top             =   2745
      Width           =   930
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "小"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Index           =   1
      Left            =   216
      TabIndex        =   1
      Top             =   2760
      Width           =   936
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "圆圈的大小"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Index           =   0
      Left            =   1092
      TabIndex        =   0
      Top             =   2424
      Width           =   1596
   End
End
Attribute VB_Name = "Configuration"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CmdCancel_Click()
    'Exit without saving any changes
    Unload Me
End Sub

Private Sub CmdOK_Click()
    'This will save the current Circle size to
    'HKEY_CURRENT_USER\Software\VB and VBA Program Settings
    'in the registry.
    SaveSetting "Samples", "JD Screen Saver", "Size", Size
    Unload Me
End Sub

Private Sub Form_Load()
    Dim nRet As Long
    
    'Make this form a TOPMOST window, so it won't get lost under
    'the Display Properties window.
    'tempLong = SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
    
    'Adjust the form height for resolution dependency.
    Height = Picture2(0).Height * 2
    
    '-----------------------------
    'Build the monitor image
    '-----------------------------
    'Set the final picture box to match the size of the
    'ones containing the picture elements
    Picture2(2).Move Picture2(0).Left, Picture2(0).Top, Picture2(0).Width, Picture2(0).Height
    nRet = BitBlt(Picture2(2).hDC, 0&, 0&, Picture2(2).ScaleWidth, Picture2(2).ScaleHeight, Picture2(1).hDC, 0&, 0&, SRCAND)
    nRet = BitBlt(Picture2(2).hDC, 0&, 0&, Picture2(2).ScaleWidth, Picture2(2).ScaleHeight, Picture2(0).hDC, 0&, 0&, SRCINVERT)
    
    'Move the picture to the actual image display,
    'center it on the screen, and put the output in
    'position.
    Image1.Picture = Picture2(2).Image
    Image1.Move (Width - Image1.Width) / 2, Image1.Top, Image1.Width, Picture2(0).Height
    Picture1.Move Image1.Left + 18 * xPixel, Image1.Top + 18 * yPixel, 153 * xPixel, 114 * yPixel
    
    'Align other form elements vertically
    Label1(0).Top = Image1.Top + Image1.Height + 8 * yPixel
    Label1(1).Top = Label1(0).Top + Label1(0).Height
    Label1(2).Top = Label1(1).Top
    HScroll1.Top = Label1(1).Top + Label1(1).Height
    CmdOK.Top = HScroll1.Top + HScroll1.Height + 10 * yPixel
 
    
    'Copy a clone of the desktop into the picture box, to
    'serve as a background for the preview
    CopyScreen Picture1
    Centerform Me
    
    'Set the hscroll to the circle size.
    HScroll1.value = Size
End Sub



Private Sub HScroll1_Change()
  'Size is a Public variable, used in the drawing routine
  Size = HScroll1.value
  'Start drawing again, using the new value
  Picture1.Cls

End Sub


Private Sub Timer1_Timer()
    'Call the circle drawing routine, with output
    'to this form's picture box.
    Draw Picture1
    
End Sub


⌨️ 快捷键说明

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