ListView Hide ScrollBar

0

Na forum pojawiało się pytanie jak ukryć poziomy pasek w ListView, tak aby się nie pojawiał przy zmianie rozmiaru.
Znalazłem odpowidź (nie wiem czy zadziała), ale nie wiem jak to przepisać na Delphi.

private const int WS_HSCROLL = 0x100000; 
  private const int WS_VSCROLL = 0x200000; 
  private const int GWL_STYLE = (-16); 


  [DllImport("user32", CharSet=CharSet.Auto)] 
  private static extern int GetWindowLong(IntPtr hwnd, int nIndex); 


  internal static bool IsVerticalScrollBarVisible(Control ctrl) 
  { 
   if (!ctrl.IsHandleCreated) 
    return false; 


   return (GetWindowLong(ctrl.Handle, GWL_STYLE) & WS_VSCROLL) != 0; 
  } 


  internal static bool IsHorizontalScrollBarVisible(Control ctrl) 
  { 
   if (!ctrl.IsHandleCreated) 
    return false; 


   return (GetWindowLong(ctrl.Handle, GWL_STYLE) & WS_HSCROLL) != 0; 
  } 

0

Może tak :

SendMessage(ListView1.Handle, $00000002, Integer(True), 0);

1 użytkowników online, w tym zalogowanych: 0, gości: 1