📄 frmnewsharefolder.frm
字号:
VERSION 5.00
Begin VB.Form FrmNewShareFolder
BorderStyle = 3 'Fixed Dialog
Caption = "设置本地文件夹共享属性"
ClientHeight = 4185
ClientLeft = 2025
ClientTop = 2865
ClientWidth = 7620
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4185
ScaleWidth = 7620
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdSetShare
Caption = "&S 设置为共享"
Height = 330
Left = 4125
TabIndex = 2
Top = 1125
Width = 1965
End
Begin VB.DirListBox Dir1
Height = 3660
Left = 75
TabIndex = 1
Top = 405
Width = 3390
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 75
TabIndex = 0
Top = 45
Width = 3390
End
End
Attribute VB_Name = "FrmNewShareFolder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Private Const SEE_MASK_INVOKEIDLIST = &HC
Private Const SEE_MASK_NOCLOSEPROCESS = &H40
Private Const SEE_MASK_FLAG_NO_UI = &H400
Private Declare Function ShellExecuteEX Lib "shell32.dll" Alias _
"ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long
Private Sub ShowProps(FileName As String, OwnerhWnd As Long)
Dim SEI As SHELLEXECUTEINFO
Dim r As Long
With SEI
.cbSize = Len(SEI)
.fMask = SEE_MASK_NOCLOSEPROCESS Or _
SEE_MASK_INVOKEIDLIST Or SEE_MASK_FLAG_NO_UI
.hwnd = OwnerhWnd
.lpVerb = "properties"
.lpFile = FileName
.lpParameters = vbNullChar
.lpDirectory = vbNullChar
.nShow = 0
.hInstApp = 0
.lpIDList = 0
End With
r = ShellExecuteEX(SEI)
End Sub
Private Sub cmdSetShare_Click()
Dim fldName As String
fldName = Me.Dir1.Path
Call ShowProps(fldName, Me.hwnd)
End Sub
Private Sub Drive1_Change()
Dir1.Path = Me.Drive1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -