多谢!!!!!11
解决方案 »
- 学vb67年,却不知道如何在菜单里加图标,烦死我了,救命啊!!!!!!!!!!
- 有关水晶报表的问题!
- 怎样去掉msgbox弹出时的声音啊?
- 在做安装包的时候能不能把其他的应用程序打包进去!
- 请教:将已画好的图象从数据库读入picture控件,但保留picture上已画好的图象
- 散分100◆◆◆【有用过MSDN都进来】◆◆◆
- 求救,吐血大求救:能不能使用计算机的com口来控制继电器?
- 请问如何分辨一个字符是中文还是西文?
- 关于学习VB的问题。
- 关于VB的打包问题!!!
- 结帐,请leswang107(leswang107) ( ) 信誉:100 等进来领分,希望以后继续关注我的问题,谢谢了!
- 如何在表中找到满足条件的一条记录后,就加到msflexgrid里去,就是找到一条加一条。
http://www.fantasiasoft.net/FileInfo/index.htm
Dim n As Long
Dim arrBytes() As Byte
Open "c:\xxxx.bmp" For Binary As 1
n = LOF(1)
ReDim arrBytes(1 To n) As Byte
Get 1, , arrBytes
Close 1
Open "c:\temp.bmp" For Binary As 1
Put 1, , arrBytes
Close 1
MsgBox "ok"
End Sub
Dim myfile() As Byte
Dim position As Long
Dim FileName As String
FileName = txtaddress.Text
position = FileLen(FileName)
ReDim myfile(position - 1) As Byte
Open FileName For Binary As #1
Get #1, , myfile
Close #1
sockclient.SendData myfile接受的:
Private lenth As Long '已经收到的数据的长度,再添加时以这个长度为依据Private Sub sockserver_DataArrival(ByVal bytesTotal As Long)
Dim receivefile() As Byte, i As Long
ReDim receivefile(1 To bytesTotal) '次处也可以是(0 To bytesTotal-1) sockserver.GetData receivefile, vbArray + vbByte Open "c:\a.bmp" For Binary As #1
Put #1, lenth + 1, receivefile
Close #1
lenth = lenth + UBound(receivefile) - LBound(receivefile) + 1
txtmessage.Text = txtmessage.Text & Time & "收到数据" & Chr(13) & Chr(10)
End Sub