📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "网络连接状态"
ClientHeight = 4965
ClientLeft = 45
ClientTop = 330
ClientWidth = 3645
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4965
ScaleWidth = 3645
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text6
Height = 1095
Left = 120
MultiLine = -1 'True
TabIndex = 6
Text = "Form1.frx":030A
Top = 3000
Width = 3135
End
Begin VB.TextBox Text5
Height = 375
Left = 1680
TabIndex = 5
Text = "Text5"
Top = 2160
Width = 1455
End
Begin VB.TextBox Text4
Height = 375
Left = 1680
TabIndex = 4
Text = "Text4"
Top = 1680
Width = 1455
End
Begin VB.TextBox Text3
Height = 375
Left = 1680
TabIndex = 3
Text = "Text3"
Top = 1200
Width = 1455
End
Begin VB.TextBox Text2
Height = 375
Left = 1680
TabIndex = 2
Text = "Text2"
Top = 720
Width = 1455
End
Begin VB.TextBox Text1
Height = 375
Left = 1680
TabIndex = 1
Text = "Text1"
Top = 240
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "运行(&R)"
Default = -1 'True
Height = 495
Left = 840
TabIndex = 0
Top = 4320
Width = 1215
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "网络连接信息"
Height = 180
Left = 120
TabIndex = 12
Top = 2760
Width = 1080
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "是否安装了网络RAS"
Height = 180
Left = 120
TabIndex = 11
Top = 2280
Width = 1530
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "连接在线"
Height = 180
Left = 120
TabIndex = 10
Top = 1800
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "通过Proxy连接"
Height = 180
Left = 120
TabIndex = 9
Top = 1320
Width = 1170
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "通过Modem连接"
Height = 180
Left = 120
TabIndex = 8
Top = 840
Width = 1170
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "通过LAN连接"
Height = 180
Left = 120
TabIndex = 7
Top = 360
Width = 990
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If IsNetConnectViaLAN() Then
Text1.Text = "是"
Else
Text1.Text = "否"
End If
If IsNetConnectViaModem() Then
Text2.Text = "是"
Else
Text2.Text = "否"
End If
If IsNetConnectViaProxy() Then
Text3.Text = "是"
Else
Text3.Text = "否"
End If
If IsNetConnectOnline() Then
Text4.Text = "是"
Else
Text4.Text = "否"
End If
If IsNetRASInstalled() Then
Text5.Text = "是"
Else
Text5.Text = "否"
End If
Text6.Text = GetNetConnectString()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -