当前位置:编程学习 > VB >>

VB SendMessage的参数

Public Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)

 

它的第二项参数  wMsg有哪些?

追问:能告诉我各项的作用吗?

答案: Window   Messages   
  Const   WM_NULL   =   &H0   
  Const   WM_CREATE   =   &H1   
  Const   WM_DESTROY   =   &H2     
  Const   WM_MOVE   =   &H3  
  Const   WM_SIZE   =   &H5  
    
  Const   WM_ACTIVATE   =   &H6      
  '  
  '     WM_ACTIVATE   state   values  
   
  Const   WA_INACTIVE   =   0  
  Const   WA_ACTIVE   =   1  
  Const   WA_CLICKACTIVE   =   2  
   
  Const   WM_SETFOCUS   =   &H7  
  Const   WM_KILLFOCUS   =   &H8  
  Const   WM_ENABLE   =   &HA  
  Const   WM_SETREDRAW   =   &HB  
  Const   WM_SETTEXT   =   &HC  
  Const   WM_GETTEXT   =   &HD  
  Const   WM_GETTEXTLENGTH   =   &HE  
  Const   WM_PAINT   =   &HF  
  Const   WM_CLOSE   =   &H10  
  Const   WM_QUERYENDSESSION   =   &H11  
  Const   WM_QUIT   =   &H12  
  Const   WM_QUERYOPEN   =   &H13  
  Const   WM_ERASEBKGND   =   &H14  
  Const   WM_SYSCOLORCHANGE   =   &H15  
  Const   WM_ENDSESSION   =   &H16  
  Const   WM_SHOWWINDOW   =   &H18  
  Const   WM_WININICHANGE   =   &H1A  
  Const   WM_DEVMODECHANGE   =   &H1B  
  Const   WM_ACTIVATEAPP   =   &H1C  
  Const   WM_FONTCHANGE   =   &H1D  
  Const   WM_TIMECHANGE   =   &H1E  
  Const   WM_CANCELMODE   =   &H1F  
  Const   WM_SETCURSOR   =   &H20  
  Const   WM_MOUSEACTIVATE   =   &H21  
  Const   WM_CHILDACTIVATE   =   &H22  
  Const   WM_QUEUESYNC   =   &H23  
   
  Const   WM_GETMINMAXINFO   =   &H24  
   
   
   
  Const   WM_PAINTICON   =   &H26  
  Const   WM_ICONERASEBKGND   =   &H27  
  Const   WM_NEXTDLGCTL   =   &H28  
  Const   WM_SPOOLERSTATUS   =   &H2A  
  Const   WM_DRAWITEM   =   &H2B  
  Const   WM_MEASUREITEM   =   &H2C  
  Const   WM_DELETEITEM   =   &H2D  
  Const   WM_VKEYTOITEM   =   &H2E  
  Const   WM_CHARTOITEM   =   &H2F  
  Const   WM_SETFONT   =   &H30  
  Const   WM_GETFONT   =   &H31  
  Const   WM_SETHOTKEY   =   &H32  
  Const   WM_GETHOTKEY   =   &H33  
  Const   WM_QUERYDRAGICON   =   &H37  
  Const   WM_COMPAREITEM   =   &H39  
  Const   WM_COMPACTING   =   &H41  
  Const   WM_OTHERWINDOWCREATED   =   &H42                               '     no   longer   suported  
  Const   WM_OTHERWINDOWDESTROYED   =   &H43                           '     no   longer   suported  
  Const   WM_COMMNOTIFY   =   &H44                                               '     no   longer   suported  
   
  '   notifications   passed   in   low   word   of   lParam   on   WM_COMMNOTIFY   messages  
  Const   CN_RECEIVE   =   &H1  
  Const   CN_TRANSMIT   =   &H2  
  Const   CN_EVENT   =   &H4  
   
  Const   WM_WINDOWPOSCHANGING   =   &H46  
  Const   WM_WINDOWPOSCHANGED   =   &H47  
   
  Const   WM_POWER   =   &H48  
  '  
  '     wParam   for   WM_POWER   window   message   and   DRV_POWER   driver   notification  
   
  Const   PWR_OK   =   1  
  Const   PWR_FAIL   =   (-1)  
  Const   PWR_SUSPENDREQUEST   =   1  
  Const   PWR_SUSPENDRESUME   =   2  
  Const   PWR_CRITICALRESUME   =   3  
   
  Const   WM_COPYDATA   =   &H4A  
  Const   WM_CANCELJOURNAL   =   &H4B  
   
  Type   COPYDATASTRUCT  
                  dwData   As   Long  
                  cbData   As   Long  
                  lpData   As   Long  
  End   Type  
   
  Const   WM_NCCREATE   =   &H81  
  Const   WM_NCDESTROY   =   &H82  
  Const   WM_NCCALCSIZE   =   &H83  
  Const   WM_NCHITTEST   =   &H84  
  Const   WM_NCPAINT   =   &H85  
  Const   WM_NCACTIVATE   =   &H86  
  Const   WM_GETDLGCODE   =   &H87  
  Const   WM_NCMOUSEMOVE   =   &HA0  
  Const   WM_NCLBUTTONDOWN   =   &HA1  
  Const   WM_NCLBUTTONUP   =   &HA2  
  Const   WM_NCLBUTTONDBLCLK   =   &HA3  
  Const   WM_NCRBUTTONDOWN   =   &HA4  
  Const   WM_NCRBUTTONUP   =   &HA5  
  Const   WM_NCRBUTTONDBLCLK   =   &HA6  
  Const   WM_NCMBUTTONDOWN   =   &HA7  
  Const   WM_NCMBUTTONUP   =   &HA8  
  Const   WM_NCMBUTTONDBLCLK   =   &HA9  
   
  Const   WM_KEYFIRST   =   &H100  
  Const   WM_KEYDOWN   =   &H100  
  Const   WM_KEYUP   =   &H101  
  Const   WM_CHAR   =   &H102  
  Const   WM_DEADCHAR   =   &H103  
  Const   WM_SYSKEYDOWN   =   &H104

上一个:VB制作CMD
下一个:VB中如何连接一个数据库

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,