映射网络驱动器.frm
来自「Windows API函数,希望大伙有用哦」· FRM 代码 · 共 46 行
FRM
46 行
VERSION 5.00
Begin VB.Form 映射网络驱动器
Caption = "Form1"
ClientHeight = 1275
ClientLeft = 60
ClientTop = 345
ClientWidth = 3690
LinkTopic = "Form1"
ScaleHeight = 1275
ScaleWidth = 3690
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "断开网络驱动器"
Height = 315
Left = 690
TabIndex = 1
Top = 660
Width = 2205
End
Begin VB.CommandButton Command1
Caption = "映射网络驱动器"
Height = 315
Left = 690
TabIndex = 0
Top = 180
Width = 2205
End
End
Attribute VB_Name = "映射网络驱动器"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function WNetConnectionDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Private Declare Function WNetDisconnectDialog Lib "mpr.dll" (ByVal hwnd As Long, ByVal dwType As Long) As Long
Private Sub Command1_Click()
WNetConnectionDialog Me.hwnd, &H1
End Sub
Private Sub Command2_Click()
WNetDisconnectDialog Me.hwnd, &H1
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?