📄 utility.frm
字号:
VERSION 2.00
Begin Form frmUtility
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
ClientHeight = 975
ClientLeft = 2490
ClientTop = 3615
ClientWidth = 5175
Height = 1380
Left = 2430
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 975
ScaleWidth = 5175
Top = 3270
Width = 5295
Begin CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 2520
TabIndex = 1
Top = 480
Width = 1215
End
Begin CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 375
Left = 3840
TabIndex = 2
Top = 480
Width = 1215
End
Begin TextBox txtInput
Height = 285
Left = 120
TabIndex = 0
Text = "Text1"
Top = 120
Width = 4935
End
End
Option Explicit
Sub cmdCancel_Click ()
g_cTemp = ""
Unload Me
End Sub
Sub cmdOK_Click ()
Const ATTR_DIRECTORY = 16 ' Declare form constant.
g_cTemp = txtInput.Text
If ((InStr(frmUtility.Caption, "directory") > 0) And (Dir(g_cTemp, ATTR_DIRECTORY) = "")) Then
MsgBox g_cTemp & " is not a directory!", 16, "Error"
Exit Sub
End If
Unload Me
End Sub
Sub Draw3D (a As Control)
Me.Line (a.Left - 10, a.Top - 10)-Step(10, a.Height + 20), RGB(128, 128, 128), BF
Me.Line (a.Left - 10, a.Top - 10)-Step(a.Width + 20, 10), RGB(128, 128, 128), BF
Me.Line (a.Left + a.Width, a.Top - 10)-Step(10, a.Height + 20), RGB(255, 255, 255), BF
Me.Line (a.Left - 10, a.Top + a.Height)-Step(a.Width + 20, 10), RGB(255, 255, 255), BF
End Sub
Sub Form_Load ()
Dim I As Integer
Move screen.Width / 2 - Me.Width / 2, screen.Height / 2 - Me.Height / 2
If (frmQuickZIP.mnuOptionsOnTop.Checked = True) Then
I = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End If
Form_Colour Me
End Sub
Sub Form_Paint ()
Call Draw3D(txtInput)
End Sub
Sub txtInput_GotFocus ()
' highlight text when control first gets focus
txtInput.SelStart = 0 ' Start selection at beginning.
txtInput.SelLength = Len(txtInput.Text) ' Length of text in Text1.
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -