vb中判断滚动条的简单语句

来源:互联网 发布:网络贷款管理法律法规 编辑:程序博客网 时间:2024/06/06 17:32

Declare   Function   GetScrollRange   Lib   "user32" 

 (ByVal   hWnd   As   Long,   ByVal   nBar   As   Long,   lpMinPos   As   Long,   lpMaxPos   As   Long)   As   Long  

  Public   Const   SB_HORZ   =   &H0  

  Public   Const   SB_VERT   =   &H1  

    

  Public   Function   VsScroll(MshGrid  As  MSHFlexGrid)  As Boolean                     -------------------判断水平滚动条的可见性  

  Dim   i   As   Long  

  VsScroll   =   False  

  i   =   GetScrollRange(MshGrid.hWnd,   SB_HORZ,   lpMinPos,   lpMaxPos)  

  If   lpMaxPos   <>   lpMinPos   Then 

 VsScroll   =   True  

  End   Function  

 

  Public Function HeScroll(MshGrid As MSHFlexGrid) As Boolean                     ----------------------判断垂直滚动条的可见性  

  Dim   i   As   Long  

  HeScroll   =   False  

  i   =   GetScrollRange(MshGrid.hWnd,   SB_VERT,   lpMinPos,   lpMaxPos)  

  If   lpMaxPos   <>   lpMinPos   Then  

HeScroll   =   True     

  End   Function 

原创粉丝点击