startup.bas
来自「Windows网络编程技术源码 (是Windows网络编程技术配套的一本源码教程」· BAS 代码 · 共 59 行
BAS
59 行
Attribute VB_Name = "startup"
Option Explicit
'
' Subroutine: Main
'
' Description:
' This is the routine which starts everything off. It first prompts
' the user whether to run an instance of the echo client or server.
' It then loads the correct form.
'
Sub Main()
Dim dwRet As Long
dwRet = MsgBox("Click Yes to start TCP echo server, or No to start TCP echo client.", vbYesNo)
If dwRet = vbYes Then
Load EchoSvr
EchoSvr.Show
Else
Load EchoCli
EchoCli.Show
End If
End Sub
'
' Function: VBntoaVers
'
' Description:
' This function takes a 32 bit value and takes the high word
' and low word as a version number (seperated by a ".") and
' returns the string version.
'
Function VBntoaVers(ByVal vers As Long) As String
Dim szVers As String
szVers = String(5, 0)
szVers = (vers And &HFF) & "." & ((vers And &HFF00) / 256)
VBntoaVers = szVers
End Function
'
' Function: hibyte
'
' Description:
' This function returns the high byte of an integer.
'
Function hibyte(ByVal wParam As Integer)
hibyte = wParam \ &H100 And &HFF&
End Function
'
' Function: lobyte
'
' Description:
' This function returns the low byte of an integer.
'
Function lobyte(ByVal wParam As Integer)
lobyte = wParam And &HFF&
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?