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

📄 rwinfo.bas

📁 星子行主机控制系统用于主机管理,方便远程操作,通信等功能.更 方便用于局域网,管理速度快,连接简单方便.注意:星子行连接可用 于带路由主机与带路由主机之间连接,非路由与非路由之间连接.带
💻 BAS
字号:
Attribute VB_Name = "Rwinfo"
'软宇公司
Option Explicit

Public Textport1 As String
Public Textport2 As Long
Public Textport3 As Long
Public Textport4 As Long
Public Textport5 As Long
Public Textport6 As Long
Public Textport7 As Long
Public Textport8 As Long

Public Sub Reinfo_Ini()

Dim StrTmp1 As String '可优化
Dim StrTmp2 As String

On Error GoTo sc
   
   Open App.path + "\Serconft.ini" For Input As #1
   Do While Not (EOF(1))
        Line Input #1, StrTmp1
        If left(StrTmp1, 1) = "[" Then
           StrTmp1 = Trim(StrTmp1)
           Select Case StrTmp1
           
                  'Case "[Skin]"
                   '         Line Input #1, StrTmp1
                    '        StrTmp1 = Trim(StrTmp1)
                     '       StrTmp2 = Mid(StrTmp1, 6)
                      '      Pub_Ini.SkinPath = StrTmp2
                  Case "[Serconft]"
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport1 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport2 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport3 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport4 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport5 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport6 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport7 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport8 = StrTmp2
                            
                        Case "[Autconft]"
                        
                       Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport1 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport2 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport3 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport4 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport5 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport6 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport7 = StrTmp2
                            
                            Line Input #1, StrTmp1
                            StrTmp1 = Trim(StrTmp1)
                            StrTmp2 = Mid(StrTmp1, 9)
                            Textport8 = StrTmp2
                        
                
                 End Select
                                                           
                End If
                
                Loop
                  
        
    Close #1
    
    Exit Sub
    
sc:

Close #1

Call Freinfo_Ini

'MsgBox "网络服务出错", 64, "提示"

End Sub

Public Sub Freinfo_Ini() '预读

Dim StrTmp3 As String
Dim StrTmp4 As String

On Error GoTo sc2
   
   Open App.path + "\Freconft.ini" For Input As #1
   Do While Not (EOF(1))
        Line Input #1, StrTmp3
        If left(StrTmp3, 1) = "[" Then
           StrTmp3 = Trim(StrTmp3)
           Select Case StrTmp3
           
                  Case "[Freconft]"
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport1 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport2 = StrTmp4
                            
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport3 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport4 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport5 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport6 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport7 = StrTmp4
                            
                            Line Input #1, StrTmp3
                            StrTmp3 = Trim(StrTmp3)
                            StrTmp4 = Mid(StrTmp3, 9)
                            Textport8 = StrTmp4
                            
                            

                             End Select
                                                           
                End If
                
                Loop
                  
        
    Close #1
    
    Call Wrifo_Ini
    
    Exit Sub
    
sc2:

Close #1

Textport1 = "Scmxp.vicp.net"
Textport2 = "8819"
Textport3 = "8820"
Textport4 = "8821"
Textport5 = "8822"
Textport6 = "8823"
Textport7 = "8824"
Textport8 = "8825"

Call Wrifo_Ini

End Sub

Public Sub Wrifo_Ini()

On Error Resume Next


   Open App.path + "\Serconft.ini" For Output As #1
   
        Print #1, "[Autconft]"
        'Print #1, "[Serconft]"
        'Print #1, "Serhost=" & main1.Scmnet1.LocalHostName
        Print #1, "Serhost=" & Textport1  '服务器地址
        Print #1, "Serport=" & Textport2 '服务器端口
        Print #1, "Cntport=" & Textport3 '连接端口
        Print #1, "ScrPort=" & Textport4 '远程屏幕
        Print #1, "Xyzport=" & Textport5 '远程坐标
        Print #1, "Ctrport=" & Textport6 '远程控制
        Print #1, "Traport=" & Textport7 '远程传送
        Print #1, "Datport=" & Textport8 '远程数据
        
   Close #1
   
   'Call SetAttr(App.path & "\Serconft.ini", vbHidden + vbReadOnly)

End Sub

⌨️ 快捷键说明

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