易截截图软件、单文件、免安装、纯绿色、仅160KB

vb的winsock控件接受出现乱码

服务器端的代码:
Private intMax    As Long
   
Private Sub Command1_Click()
sckServer(intMax).SendData Text1.Text
End Sub

  Private Sub Form_Load()
        intMax = 0
        sckServer(0).LocalPort = 1011
        sckServer(0).Listen
  End Sub
   
  Private Sub sckServer_ConnectionRequest _
  (Index As Integer, ByVal requestID As Long)
        If Index = 0 Then
          intMax = intMax + 1
          Load sckServer(intMax)
          sckServer(intMax).LocalPort = 0
          sckServer(intMax).Accept requestID
        End If
  End Sub

Private Sub sckServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim shuju As String
sckServer(intMax).GetData shuju
Text2.Text = shuju
End Sub
客户端代码:
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Command1_Click()
Winsock1.SendData Text1.Text
End Sub

Private Sub Command3_Click()
          <


相关问答:

vb打印

要用vb打印一条线,长度是100毫米怎么写?
关注

VB code:
Printer.ScaleMode = vbMillimeters
Printer.Line (10, 10)-(110, 10)

    Printer.ScaleMode = vbMillimeters
    Print ......

vb中sql语句引号问题

"insert into user1(name,age) values('" & Text1.Text & "','" & Text2.Text & "' )"
问题:对sql语句中单、双引号模糊。既然 Text1.Text就表示 ......

VB 网页自动登陆

Option Explicit

Private Sub Command1_Click()
    WebBrowser1.Navigate "http://mc.qeedoo.com/servers.php"
End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal ......

vb能否把winsock控件封装到dll中

vb将winsock控件封装到dll问题 有什么好的思路? 如果用Socket API呢?
例如,像下面这样封装Winsock控件,行的通?
创建ActiveX dll,添加窗体frmClient,加入WinSock控件wskClient。
类代码:
Option Expli ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号