K
K
kokapuk2022-02-17 18:38:43
C++ / C#
kokapuk, 2022-02-17 18:38:43

How to remove the horizontal scroll bar?

I have already rummaged through everything, nothing works, I even tried to remove it through ShowScrollBar, nothing works.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2022-02-17
@firedragon

Can you show a screenshot and code.

D
Dmitry_Sel, 2022-02-21
@Dmitry_Sel

this.HorizontalScroll.Visible = false;
in the designer
or somewhere in the initialization
panel1.HorizontalScroll.Visible = false;
still found this

const int SB_HORZ = 0;

       

        [DllImport("user32.dll")]

        static extern bool ShowScrollBar(IntPtr hWnd, int wBar, bool bShow);

 

        protected override void OnShown(EventArgs e)

        {

            ShowScrollBar(this.panel1.Handle, SB_HORZ, false);

            base.OnShown(e);

        }

    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question