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

📄 10846.html

📁 VB技巧问答10000例 VB技巧问答10000例
💻 HTML
字号:
<html>
  <head>
    <title>Winsock 的传档问题</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Winsock 的传档问题</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by CK on March 10, 1999 at 13:15:06:<p>
这是 Server 端送档的程式, 我 Client 该怎么接档呢???? 因为我自己试了后图片不是出来全黑就是花的....<p>Private Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long<br>Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As Form2) As Long<br>Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long<br>Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long<br>Private Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long<br>Dim byteAry() As Byte<br>Dim byteAry1() As Byte<br>Dim byteAry2() As Byte<br>Dim totbyte As Long, I As Long, J As Long<p>Dim Devmodeset As Form2<br>Dim Screenhdc As Long<br>Dim Rval As Long<br>Dim X1&, X2&, X3&, X4&, Y1&, Y2&, Y3&, Y4&<br>X1 = 0: Y1 = 0: X2 = 640: Y2 = 480<br>X3 = 0: Y3 = 0: X4 = 640: Y4 = 480<br>Screenhdc = CreateDC("display", "", "", Form2)<br>Rval = StretchBlt(Picture1.hdc, X1, Y1, X2, Y2, Screenhdc, X3, Y3, X4, Y4, &HCC0020)<br>Rval = DeleteDC(Screenhdc)<br>Picture1.Refresh<br>totbyte = X2 * Y2<p>ReDim byteAry(totbyte)<br>Rval = GetBitmapBits(Picture1.Image, totbyte, byteAry(0))<p> Winsock1(1).SendData byteAry<br> DoEvents<p>End Sub
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 10846-->
<!--top: 10867--><li><a href="10867.html">Re: Winsock 的传档问题</a> <b>guppy</b> <i>12:23:42 3/11/99</i>
(<!--responses: 10867-->1)
<ul><!--insert: 10867-->
<!--top: 10920--><li><a href="10920.html">Re: Winsock 的传档问题</a> <b>CK</b> <i>05:16:29 3/13/99</i>
(<!--responses: 10920-->0)
<ul><!--insert: 10920-->
</ul><!--end: 10920-->
</ul><!--end: 10867-->
</ul><!--end: 10846-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

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