⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmgetip.frm

📁 vb做的数据库 客户管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmGetIP 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   Caption         =   "IP 扫描"
   ClientHeight    =   6015
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4230
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6015
   ScaleWidth      =   4230
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.ListBox result 
      Appearance      =   0  'Flat
      Height          =   2190
      Left            =   60
      TabIndex        =   4
      Top             =   2760
      Width           =   4095
   End
   Begin VB.Frame ScanFrame 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "IP 扫描"
      ForeColor       =   &H80000008&
      Height          =   1875
      Left            =   300
      TabIndex        =   3
      Top             =   540
      Width           =   3795
      Begin khgl.chameleonButton StartScan 
         Height          =   315
         Left            =   1260
         TabIndex        =   7
         Top             =   1380
         Width           =   1155
         _ExtentX        =   2037
         _ExtentY        =   556
         BTYPE           =   3
         TX              =   "开始扫描    "
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   1
         FOCUSR          =   -1  'True
         BCOL            =   14215660
         FCOL            =   0
      End
      Begin VB.CheckBox isSaveToFile 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "保存本次扫描结果"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   480
         TabIndex        =   2
         Top             =   900
         Width           =   3075
      End
      Begin VB.CheckBox isScanShareCheck 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "扫描共享资源"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   480
         TabIndex        =   1
         Top             =   600
         Width           =   3075
      End
      Begin VB.CheckBox isScanIPCheck 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "扫描相应计算机的 IP 地址"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   480
         TabIndex        =   0
         Top             =   300
         Width           =   3075
      End
   End
   Begin VB.Label lbl_ExitButton 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H80000008&
      Height          =   135
      Left            =   3960
      TabIndex        =   6
      Top             =   120
      Width           =   135
   End
   Begin VB.Label lbl_MinButton 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BackStyle       =   0  'Transparent
      ForeColor       =   &H80000008&
      Height          =   135
      Left            =   3720
      TabIndex        =   5
      Top             =   120
      Width           =   195
   End
   Begin VB.Image Image1 
      Height          =   2580
      Left            =   0
      Picture         =   "frmGetIP.frx":0000
      Top             =   0
      Width           =   4215
   End
End
Attribute VB_Name = "frmGetIP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
'URL 链接声明
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Form_Load()
    Me.Left = frmnetSend.Left
    Me.Top = frmnetSend.Top + frmnetSend.ScaleHeight
    Me.Width = frmnetSend.Width
    Me.Height = 2580

    result.FontName = "宋体"
    result.Height = 2040
    result.Width = 3990
    result.Left = 120
    isScanIP = True         '正在扫描为真
'   isScanShare = False     '扫描共享资源为假


    '如果主窗体被设置为总在最上,则 frmGetIP 也设置为总在最上
    If frmnetSend.isSetFrmOnTop Then
        frmOnTop Me, True
    End If

    '打开窗体相吸的效果
    DockingStart Me

End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub lbl_ExitButton_Click()
   frmGetIP.Hide
   Unload frmGetIP
End Sub

Private Sub lbl_MinButton_Click()
  Me.WindowState = vbMinimized
End Sub

Private Sub Form_Unload(Cancel As Integer)
        '关闭窗体相吸的效果
    DockingTerminate Me
End Sub

Private Sub isScanIPCheck_Click()
    If isScanIPCheck.Value = 1 Then
        isScanIP = True
    Else
        isScanIP = False
    End If
End Sub

Private Sub StartScan_Click()
    Dim isNowStartScan As Integer
    Dim Msg As String

    StartScan.Caption = "正在扫描...    "

    Msg = "Net Send - IP Scan 将扫描整个局域网," _
        & vbCrLf & vbCrLf _
        & "可能要花费几分钟时间,是否继续?" & vbCrLf
    isNowStartScan = MsgBox(Msg, vbQuestion + vbYesNo, "确认")
    
    If isNowStartScan = vbYes Then
        frmGetIP.MousePointer = vbHourglass
        Me.Enabled = False

                Call Main

        Me.Enabled = True
        StartScan.Caption = "开始扫描    "
        frmGetIP.MousePointer = vbDefault
    Else
        StartScan.Caption = "开始扫描    "
        Exit Sub
    End If
End Sub
Private Sub result_DblClick()
    Dim MyOpenTag As String
    MyOpenTag = MyList(result.ListIndex).ClkValue

    If MyList(result.ListIndex).isEnabled Then
        If InStr(LCase(MyOpenTag), "\ipscan.txt") <> 0 Then
            ShellExecute Me.hwnd, "open", "notepad.exe", MyOpenTag, "", 1
        Else
            ShellExecute Me.hwnd, "open", "explorer.exe", MyOpenTag, "", 1
        End If
    End If
End Sub


Private Sub TitleName_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -