none
Form autoscroll

    Question

  • I am having trouble. And the problem is this. I need to know how I could control the Autoscroll horizontally on a form
    Tuesday, March 28, 2017 12:15 AM

All replies

  • I am having trouble. And the problem is this. I need to know how I could control the Autoscroll horizontally on a form
    What sort of control do you want to apply?  Generally, if it's an autoscroll you can't control it. If you want to implement your own horizontal scrolling of the form's contents, put them in a container (eg, panel) and scroll the container.
    Tuesday, March 28, 2017 1:17 AM
  • Oh, I didn't know that. I would just like a way to be able scroll horizontally in the form with the arrow keys.
    Tuesday, March 28, 2017 1:56 AM
  • Oh, I didn't know that. I would just like a way to be able scroll horizontally in the form with the arrow keys.

    A preferable solution is to design the form so that it doesn't need to scroll.

    You will find it difficult to scroll with the arrow keys because you have to somehow determine whether the user intended the keystrokes to apply to the scrolling, or as input for a control (for instance, to move the caret in a text box).  A container with a scroll bar to scroll the container within the form is relatively easy to implement, but it requires the user to select the scroll bar before trying to scroll.

    If you want to try to implement arrow keys, start here:
    https://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview(v=vs.110).aspx

    Tuesday, March 28, 2017 2:30 AM
  • OK thank you :)
    Tuesday, March 28, 2017 1:36 PM
  • Hi Scott7465625255,

    It seems that you have solved your issue now, please remember to close your thread by marking useful posts as answer to let more community members search this answer quickly.

    Thanks for your understanding.

    Best Regards,

    Cherry Bu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 29, 2017 1:48 AM
    Moderator