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

📄 mmain.bas

📁 vb做的网易评论自动采集软件
💻 BAS
字号:
Attribute VB_Name = "mMain"
Option Explicit

Public AppPath As String
Public AppTitle As String
'Public INI As New CFastINI

Public g_lWindowsVersion As enumWindowsVersion
Public Enum enumWindowsVersion
    Win16 = 0
    Win9x = 1
    WinNT = 2
    Win2000 = 3
    WinXP = 4
    Win2003 = 5
End Enum
Private Type OSVERSIONINFO
    dwOSVersionInfoSize As Long
    dwMajorVersion As Long
    dwMinorVersion As Long
    dwBuildNumber As Long
    dwPlatformId As Long
    szCSDVersion As String * 128
End Type
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (LpVersionInformation As OSVERSIONINFO) As Long

Public g_lCommentCount      As Long '采集评论数
Public g_lPageCount         As Long '采集页面

Sub Main()

    Call InitializeVars '初始化常用变量
    
    Load Form1
    Form1.Show
End Sub



Private Sub InitializeVars()

    '................获得当前路径,保存到Public AppPath
    Dim t As String
    t = App.Path
    If Right(t, 1) = "\" Then
        AppPath = t
    Else
        AppPath = t + "\"
    End If

    '...............获得操作系统版本
    Dim verinfo As OSVERSIONINFO
    verinfo.dwOSVersionInfoSize = Len(verinfo)
    If GetVersionEx(verinfo) <> 0 Then
        Select Case verinfo.dwPlatformId
            Case 0
                'windows 3.2
                g_lWindowsVersion = Win16
            Case 1
                'windows 9x
                g_lWindowsVersion = Win9x
            Case 2
                'windows nt/2k
                If verinfo.dwMajorVersion < 5 Then
                    g_lWindowsVersion = WinNT
                ElseIf verinfo.dwMajorVersion = 5 Then
                    If verinfo.dwMinorVersion = 0 Then
                        g_lWindowsVersion = Win2000
                    ElseIf verinfo.dwMinorVersion = 1 Then
                        g_lWindowsVersion = WinXP
                    ElseIf verinfo.dwMinorVersion = 2 Then
                        g_lWindowsVersion = Win2003
                    End If
                End If
        End Select
    End If

    'INI.File = AppPath & "options.ini"
    
End Sub

⌨️ 快捷键说明

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