vbÄÜ·ñ°Ñwinsock¿Ø¼þ·â×°µ½dllÖÐ
vb½«winsock¿Ø¼þ·â×°µ½dllÎÊÌâ ÓÐʲôºÃµÄ˼·£¿ Èç¹ûÓÃSocket APIÄØ£¿
ÀýÈ磬ÏñÏÂÃæÕâÑù·â×°Winsock¿Ø¼þ£¬ÐеÄͨ£¿
´´½¨ActiveX dll£¬Ìí¼Ó´°ÌåfrmClient£¬¼ÓÈëWinSock¿Ø¼þwskClient¡£
Àà´úÂ룺
Option Explicit
Private objFrm As frmClient
Private WithEvents wskClient As Winsock
Private Sub Class_Initialize()
Set objFrm = New frmClient
Set wskClient = objFrm.wskClient
End Sub
Private Sub Class_Terminate()
Unload objFrm
'wskClient.Close
Set wskClient = Nothing
Set objFrm = Nothing
End Sub
Private Sub wskClient_Close()
On Error GoTo ErrDes
If wskClient.State Then
wskClient.Close
End If
Exit Sub
ErrDes:
MsgBox "¹Ø±ÕÁ¬½Ó·¢Éú´íÎó£º" & Err.Description & "¡£", vbExclamation, gMsgTitle
End Sub
Private Sub wskClient_Connect()
End Sub
Private Sub wskClient_DataArrival(ByVal bytesTotal As Long)
On Error GoTo ErrDes
Dim strArrival As String
Dim strCommand As String
Dim g_strData As String
wskClient.GetData g_strData
Debug.Print g_strData
ErrDes:
MsgBox Err.Description, vbInformation, "´íÎóÌáʾ"
End Sub
Public Function DataSend(
Ïà¹ØÎÊ´ð£º
Printer.ScaleMode = 6
6±íʾºÁÃ×
Printer.PaperSize = vbPRPSA4
'³õʼ×ø±ê
x = 1
y = 4
'×î´óµÄÏß¿ð
Printer.DrawStyle = 0
Printer.Line (x, y)-(x + 132.5, y) ......
´ó¼ÒºÃ£¬Îʸövb´òÓ¡ÎÊÌâ
printer.print "dsff"
.....
....
Printer.EndDoc
´òÓ¡³É¹¦ºóÎÒ½«Ö´ÐÐ
sqlstr = "update vc_yh set pr=' ÒÑ´òÓ¡ ', ......
±ÈÈç½ø³Ì¼ÓÔØеijÌÐò¡£
ÔÚÆäÔËÐÐ֮ǰ×èÖ¹¡£
È»ºóÔÊÐíºó·ÅÐС£
±ÈÈç³ÌÐòÖ÷Îļþ·¾¶ÊÇc:\test\test.exe£¬½¨Á¢ÄÚÈÝÈÎÒâµÄÎļþc:\test\test.exe.manifest¡£
¾ÍÊDz»ÖªµÀ³ÌÐòÎļþ·¾¶¡£
ÉèÖ ......
Option Explicit
Private Sub Command1_Click()
WebBrowser1.Navigate "http://mc.qeedoo.com/servers.php"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal ......
ÔÚvbÕâ±à³ÌÀïËƺõÓкܶàµÄ¶«Î÷ÊÇÏàÁªÏµµÄ£¬ÎªÊ²Ã´ÓÐЩÈ˶ÔvbµÄ±à³ÌÃþ²»µ½Í·ÄÔ°¡£¡²¢ÇÒÓÐЩʺÜÈÝÒ׵ģ¬µ«ÊÇÈ´°ÑËüÃǵĴúÂë±ä³É¸´ÔÓ£¬Ò²È¥ÏëһЩ²»ÄÜʵÏֵĶ«Î÷°¡£¡
û·ÖÁË£¬Â¥Ö÷¶àÀ´µã·Ö£¡
À´½Óµã·Ö
......