Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : vb

vb´®¿ÚͨÐűà³Ì


Ò»¡¢¸ÅÊö
     ´®¿ÚͨѶ×÷ΪһÖÖ¹ÅÀ϶øÓÖÁé»îµÄͨѶ·½Ê½£¬±»¹ã·ºµØÓ¦ÓÃÓÚPC¼äµÄͨѶÒÔ¼°PCºÍµ¥Æ¬»úÖ®¼äµÄͨѶ֮ÖС£ Ìáµ½´®¿ÚͨѶµÄ±à³Ì£¬ÈËÃÇÍùÍùÁ¢¿ÌÏëµ½C¡¢»ã±àµÈ¶Ôϵͳµ×²ã²Ù×÷Ö§³Ö½ÏºÃµÄ±à³ÌÓïÑÔÒÔ¼°´ó´®·±ËöµÄ´úÂë¡£
   ʵ¼ÊÉÏ£¬Ö»ÒªÎÒÃǽèÖúÏà¹ØActiveX¿Ø¼þµÄ°ïÖú£¬¼´Ê¹ÊÇÔڵײã²Ù×÷Ò»Ïò²»±»ÈË¿´ºÃµÄVBÖУ¬Ò»ÑùÄܹ»ÊµÏÖ´®¿Úͨ Ѷ£¬ÉõÖÁÆäʵÏÖ·½·¨ºÍC¡¢»ã±àÏà±È£¬Òª¸ü¼Ó¿ì½Ý·½±ã¡£ÏÂÃ棬±ÊÕ߾ͽéÉÜÒ»ÏÂÔÚVBÖÐʵÏÖ´®¿ÚͨѶµÄ·½·¨¡£
     ÔÚVisual BasicÖÐÓÐÒ»¸öÃûΪMicrosoft Communication Control£¨¼ò³ÆMSComm£©µÄͨѶ¿Ø¼þ¡£ÎÒÃÇֻҪͨ ¹ý¶Ô´Ë¿Ø¼þµÄÊôÐÔºÍʼþ½øÐÐÏàÓ¦±à³Ì²Ù×÷£¬¾Í¿ÉÒÔÇáËɵØʵÏÖ´®¿ÚͨѶ¡£ÏÂÃ棬±ÊÕ߾ͼòÒªµØ½éÉÜÒ»ÏÂ
MSComm¿Ø¼þµÄʹÓ÷½·¨¡£
¶þ¡¢MSComm¿Ø¼þµÄÖ÷ÒªÊôÐÔ¡¢Ê¼þ
1¡¢MSCommµÄÊôÐÔ
     ÓÉÓÚMSComm¿Ø¼þÊôÐԺܶ࣬Ôڴ˱ÊÕß½ö½éÉÜÓëʵÏÖ´®¿ÚͨѶÃÜÇÐÏà¹ØµÄºËÐÄÊôÐÔ¡£
     Commport£ºÉèÖÃͨѶËùÕ¼ÓõĴ®¿ÚºÅ¡£ÈçÉè³É1£¨Ä¬ÈÏÖµ£©£¬±íʾ¶ÔCom1½øÐвÙ×÷¡£
     Setting£º¶Ô´®¿ÚͨѶµÄÏà¹Ø²ÎÊý¡£°üÀ¨´®¿ÚÍ ......

ÔÚVBÖÐÀûÓÃAPI½øÐд®¿ÚͨÐÅ


       Ò»°ãÀ´Ëµ£¬ÔÚVBÖбàд´®¿ÚͨѶ³ÌÐò£¬Ê×ÏÈ¿¼Âǵ½ÊÇʹÓÃMSComm¿Ø¼þ£¬¿ÉÊǸÿؼþ²»ÄÜÉèÖó¬Ê±£¬¶øÇÒ¶ÔÐí¶àÄÚ²¿µÄ²ÎÊý½øÐÐÁËÒþ²Ø£¬´Ó¶ø²»ÄÜÂú×ãÓÐЩ¾ßÌåµÄ¹¤×÷¡£¶øʹÓÃAPI½øÐд®¿ÚͨÐÅ£¬´ó¶àÊÇʹÓÃVC£¬ºÜÉÙ¼ûµ½ÍêÕûµÄVB´úÂ룬Ϊ´Ë£¬ÎÒ±àдÁËÕâ¸öÄ£¿é¡£
      Í¬Ê±£¬ÓÉÓÚ´®¿ÚͨÐÅÊÇ»ùÓÚ×Ö½ÚÁ÷µÄ£¬Îª·½±ã³ÌÐòÉè¼Æ£¬»¹±àдÁËÈý¸ö¼òµ¥µÄ¸¨Öúº¯Êý£¬²¢Ð´ÁËÒ»¸öÏêϸµÄ²âÊÔ´úÂë¡£
      ¾ßÌå´úÂëÈçÏ£º
Option Explicit  
Option Base 0  
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal lpOverlapped As Long) ......
×ܼǼÊý:380; ×ÜÒ³Êý:64; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [55] [56] [57] [58] [59] [60] [61] [62] [63] 64  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ