在VB 中AND 有位运算的作用。
&H7FFF&即为0111111111111111B
则屏蔽了高位只佘低位了不知对不对.
我认为

解决方案 »

  1.   

    参考.检测Windows版本号函数
    Function WinVer()
    ver& = GetVersion()
    winhigh = ver& Mod 256
    winlow = Int(ver& / 256) Mod 256
    WinVer = ((winhigh * 100) + winlow) / 100
    End Function另:
    http://www.google.com/search?hl=zh-CN&ie=UTF-8&oe=UTF-8&q=VB+%E9%AB%98%E4%BD%8E%E5%AD%97%E8%8A%82&lr=lang_zh-CN
      

  2.   

    昏倒……
    看API区的置顶帖子没有
    当初我特地置顶的
      

  3.   

    http://expert.csdn.net/Expert/TopicView1.asp?id=1404694
      

  4.   

    Public Property Get LoWord(ByRef dword As Long) As Integer
        LoWord = (dword And &H7FFF&) Or (((dword And &H8000&) <> 0) And &H8000)
    End Property
    '求低字节的吧?是不是和VC中的LOWORD一样,但为什么要用And &H7FFF&??什么意思?答:dword为32位数据,dword And &H7FFF& 取得32位中的低16位,dword And &H8000& 我认为作用是取得符号位,也32位中的最高位。当dword And &H8000&的值比较后等于0,那么dword And &H8000& and &H8000就为0,如果比较后值为1那么dword And &H8000& and &H8000就为1。起到了取到符号位的作用。那么最后再将dword And &H7FFF&取得的低16位与取得的符号位相或,那么最终LoWord的值就为符号位与低16位的整合数。我想它应和VC++的LOWORD一样。总之VC操作系统低层的东西要比VB容易方便多了,VB有些东西虽然也能实现,但是写起来比较麻烦。
    以上是本人自己的观点,可能有错,因为我只学过C,没有学过VC,所有有错还请各位大虾们多多指点…!!!
      

  5.   

    TO: jennyvenus(九阴白骨脱衣艳舞)老兄改改你的中文名撒,我看到你的中名浑身不爽啊…!!!
      

  6.   

    TO:同志们MS已经对LOWORD和HIWORD等操作有了API,我们可以直接调用的,何必自己再做呢?Private Declare Function LoByte Lib "TLBINF32" Alias "lobyte" (ByVal Word As Integer) As Byte
    Private Declare Function HiByte Lib "TLBINF32" Alias "hibyte" (ByVal Word As Integer) As Byte
    Private Declare Function loword Lib "TLBINF32" (ByVal DWord As Long) As Integer
    Private Declare Function hiword Lib "TLBINF32" (ByVal DWord As Long) As Integer
      

  7.   

    to chenyu5188(蓝色情调),我马上改
      

  8.   

    谢谢:chenyu5188(蓝色情调)  ::你这小子挺牛的呀~~~和dsclub(▁▂▃▄▅▆▇█ 騩鹬)