熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> PB編程 >> 正文

PowerBuilder制作IE風格的圖標按鈕[3]

2013-11-23 17:25:28  來源: PB編程 

      if not sb_SuppressHoverBorder then 
        lr_Borderleft =  
        lr_Bordertop =  
        lr_Borderright = UnitsToPixels 
        (thisWidth XUnitsToPixels!) 
        lr_Borderbottom = UnitsToPixels 
        (thisHeight YUnitsToPixels!)

      if flags < > then 
        DrawEdge(GetDC(handle(this)) 
        lr_Border +++
      else 
        // Left Button Down 
        DrawEdge(GetDC(handle(this)) 
        lr_Border +++
      end if

      end if

    else

    // 檢測鼠標是否滑出按鈕區域? 
      if (XPos < or YPos < ) or (XPos > 
        thisWidth or YPos > thisHeight) then 
        ib_MouseCaptured = FALSE 
        ReleaseCapture()

        in_State =  
        thisPictureName = is_PicNormal

      end if

    end if

    return
    //
    // *** end mousemove event ***

    // LButtonDown 事件代碼
    // *** begin lbuttondown event ***
    //
    rect lr_Border

    if ib_MouseCaptured then
      ib_MouseCaptured = FALSE 
      ReleaseCapture()
    end if

    in_State =
    thisPictureName = is_PicClickDown

    SetCapture(handle(this))
    ib_MouseCaptured = TRUE

    if not sb_SuppressHoverBorder then 
      lr_Borderleft =  
      lr_Bordertop =  
      lr_Borderright = UnitsToPixels 
      (thisWidth XUnitsToPixels!) 
      lr_Borderbottom = UnitsToPixels 
      (thisHeight YUnitsToPixels!)

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/PB/201311/24553.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.