📄 desknote.frm
字号:
VERSION 5.00
Begin VB.Form DeskNote
BorderStyle = 1 'Fixed Single
Caption = " 桌面留言簿"
ClientHeight = 3645
ClientLeft = 45
ClientTop = 330
ClientWidth = 5430
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "DeskNote.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3645
ScaleWidth = 5430
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox TxtWrite
Height = 2505
Left = 270
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 330
Visible = 0 'False
Width = 4845
End
Begin VB.CommandButton CmdWrite
Caption = "写留言"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 2250
TabIndex = 1
Top = 3180
Width = 1335
End
Begin VB.Timer Timer1
Interval = 100
Left = 1590
Top = 3150
End
Begin VB.CommandButton CmdExit
Caption = "看留言"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 3780
TabIndex = 0
Top = 3180
Width = 1335
End
End
Attribute VB_Name = "DeskNote"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Transpt()
Dim Wstyle As Long
Dim Hparent As Long
Wstyle = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
SetWindowLong Me.hwnd, GWL_EXSTYLE, Wstyle + WS_EX_TRANSPARENT
Hparent = GetParent(Me.hwnd)
SetParent Me.hwnd, Hparent
SetWindowPos Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOZORDER Or _
SWP_NOSIZE Or SWP_NOMOVE Or SWP_DRAWFRAME
End Sub
Private Sub CmdExit_Click()
If CmdExit.Caption = "看留言" Then
TxtWrite.Visible = True
CmdWrite.Enabled = True
CmdExit.Caption = "知道了"
ElseIf CmdExit.Caption = "知道了" Then
Unload Me
End If
End Sub
Private Sub CmdWrite_Click()
If CmdWrite.Caption = "写留言" Then
With TxtWrite
.Text = ""
.Visible = True
.SetFocus
End With
CmdWrite.Caption = "留 言"
ElseIf CmdWrite.Caption = "留 言" Then
If TxtWrite = "" Then
mymsg = MsgBox("留言簿没有内容,退出吗?", vbOKCancel, "")
If mymsg = vbOK Then
Unload Me
Else
Exit Sub
End If
Else
CmdWrite.Caption = "写留言"
CmdWrite.Enabled = False
TxtWrite.Visible = False
CmdExit.Enabled = True
CmdExit.Caption = "看留言"
End If
End If
End Sub
Private Sub Form_Load()
Call Transpt
OldLeft = Me.Left
OldTop = Me.Top
End Sub
Private Sub Form_Resize()
Call Transpt
OldLeft = Me.Left
OldTop = Me.Top
End Sub
Private Sub Timer1_Timer()
If Me.Left <> OldLeft Or Me.Top <> OldTop Then
Call Transpt
OldLeft = Me.Left
OldTop = Me.Top
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -