您的位置:   首页>>设计与制作>>电脑抢答器设计与制作
  用VB做抢答器
  • 来源:
  • 作者:qdq
  • 时间:2006/10/20 8:00:39
  • 网友评论:0
  • 点击数:20920
推荐阅读   加入收藏      

cocolong2002 (龙可可二级用户 该版得分小于等于500分,大于100分   2002-04-23 08:42:20 在 VB / 基础类 提问

    用并口,来读取连接在其上的开关状态,我做了8个开关。可是不知道在VB中如何直接读取并口数据。实际上我是用批处理+debug   +   VB(只起到出题、界面和统计分数的作用)来实现的。请教高手,能不能把直接在VB中读取并口的方法告诉我。
问题点数:100、回复次数:4
2楼  dirotac   (一粒沙尘) 二级用户 该版得分小于等于500分,大于100分  回复于 2002-04-24 21:03:49  得分 50

//放在模块里  
  '   Copyright   (c)   1997-2000   Hai   Li,   Zeal   SoftStudio.  
  '   E-Mail:info@zealsoftstudio.com  
  '   http://www.zealsoftstudio.com   (English)  
  '   http://www.nease.net/~zealsoft/   (Chinese)  
   
  Option   Explicit  
      Public   Type   NOTIFYICONDATA  
              cbSize   As   Long  
              hwnd   As   Long  
                uId   As   Long  
                uFlags   As   Long  
                uCallBackMessage   As   Long  
                hIcon   As   Long  
                szTip   As   String   *   64  
                End   Type  
              'constants   required   by   Shell_NotifyIcon   API   call:  
              Public   Const   NIM_ADD   =   &H0  
              Public   Const   NIM_MODIFY   =   &H1  
              Public   Const   NIM_DELETE   =   &H2  
              Public   Const   NIF_MESSAGE   =   &H1  
              Public   Const   NIF_ICON   =   &H2  
              Public   Const   NIF_TIP   =   &H4  
              Public   Const   WM_MOUSEMOVE   =   &H200  
              Public   Const   WM_LBUTTONDOWN   =   &H201           'Button   down  
              Public   Const   WM_LBUTTONUP   =   &H202               'Button   up  
              Public   Const   WM_LBUTTONDBLCLK   =   &H203       'Double-click  
              Public   Const   WM_RBUTTONDOWN   =   &H204           'Button   down  
              Public   Const   WM_RBUTTONUP   =   &H205               'Button   up  
              Public   Const   WM_RBUTTONDBLCLK   =   &H206       'Double-click  
              Public   Declare   Function   SetForegroundWindow   Lib   "user32"   _  
              (ByVal   hwnd   As   Long)   As   Long  
              Public   Declare   Function   Shell_NotifyIcon   Lib   "shell32"   _  
              Alias   "Shell_NotifyIconA"   _  
              (ByVal   dwMessage   As   Long,   pnid   As   NOTIFYICONDATA)   As   Boolean  
              Public   nid   As   NOTIFYICONDATA  
   
   
   
   
  Declare   Sub   Outport   Lib   "vbio32.dll"   (ByVal   portID   As   Integer,   ByVal   nbyte   As   Integer)  
  Declare   Sub   OutportW   Lib   "vbio32.dll"   (ByVal   portID   As   Integer,   ByVal   nWord   As   Integer)  
  Declare   Sub   OutportD   Lib   "vbio32.dll"   (ByVal   portID   As   Integer,   ByVal   dwDWord   As   Long)  
  Declare   Function   Inport   Lib   "vbio32.dll"   (ByVal   portID   As   Integer)   As   Integer  
  Declare   Function   InportW   Lib   "vbio32.dll"   (ByVal   portID   As   Integer)   As   Integer  
  Declare   Function   InportD   Lib   "vbio32.dll"   (ByVal   portID   As   Integer)   As   Long  
  Declare   Function   IsWinNT   Lib   "vbio32.dll"   ()   As   Boolean  
  Declare   Function   GetLPTPortAddress   Lib   "vbio32.dll"   (ByVal   portID   As   Integer)   As   Integer  
 
相关文章