📄 control.frm
字号:
VERSION 5.00
Begin VB.Form ControlForm
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Caption = "Jim & Don's Screen Saver Demo"
ClientHeight = 1812
ClientLeft = 1464
ClientTop = 4704
ClientWidth = 4152
ControlBox = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Icon = "control.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 1812
ScaleWidth = 4152
ShowInTaskbar = 0 'False
Visible = 0 'False
Begin VB.Timer Timer1
Interval = 400
Left = 1896
Top = 1320
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 1080
Left = 120
ScaleHeight = 1080
ScaleWidth = 1932
TabIndex = 0
Top = 0
Width = 1932
End
End
Attribute VB_Name = "ControlForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'For information about this program see the declarations
'section of the JDSaver.BAS module.
'
'This form is used to communicate with the Display Properties Dialog,
'in order to place a demo in the preview window, and is called
'from Sub Main when the program is started with
'the /p command parameter
Option Explicit
Private Sub Form_Load()
'Set up subclassing to handle WM_CLOSE messages
'sent to the picture box. Subclass is in JDSAVER.BAS,
'and it calls a CtlProc function also in that module.
subclass Picture1.hwnd
'Prior versions for VB4 required MsgHoo32.ocx, no longer
'needed.
'Query the size of the client area of the Display
'Properties output window
tempLong = GetClientRect(CPWindow, CPRect)
'Resize the picture box to match
Picture1.Move 0, 0, (CPRect.Right - CPRect.Left) * xPixel, (CPRect.Bottom - CPRect.Top) * yPixel
'Copy a clone of the desktop into the picture box, to
'serve as a background for the preview
CopyScreen Picture1
'Move the picture box into place on the Display
'Properties form
tempLong = SetParent(Picture1.hwnd, CPWindow)
'Set a flag so the timer will keep running until the
'picture is unloaded
PictureLoaded = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
'It is generally safest to remove subclassing
'prior to program end.
UnSubClass Me.hwnd
End Sub
Private Sub Timer1_Timer()
If IsWindow(CPWindow) = 0 Or Not PictureLoaded Then
'If we got the WM_CLOSE message, or if the Display
'Properties dialog somehow went away without our
'getting the message (GPF or something).
Unload Me
Else
'Continue drawing the Circles
Draw Picture1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -