Results 1 to 2 of 2

Thread: How to add scrollbars in C#?

  1. #1
    ThomasBarnes is offline Senior Member
    Join Date
    Dec 2009
    Posts
    303
    Rep Power
    3

    Default How to add scrollbars in C#?

    I am new to C # programming language. And I'm facing a small problem in making the scroll. I have the encoding which always stay centered on screen, rather than resizing the window. But now I want to add vertical and horizontal scroll bars on the windows that are too small to display all content. Now when I try to do the rest get just cuts off. Does anyone know how to add scroll in C #? Please give me some codes and about the same..!

  2. #2
    HernandezOrtiz is offline Senior Member
    Join Date
    Dec 2009
    Posts
    301
    Rep Power
    3

    Default

    You must use the scroll bars to display the whole program, or you will get cut off at the end. This means that we can not see the end part that does not fit your screen. You can use the HScrollBar VScrollBar class and create the scroll bar. Here are the codes for the same:

    To construct the HScrollBar Class (Horizontal Scroll), use the code:

    Code:

    [ClassInterfaceAttribute(ClassInterfaceType.AutoDis patch)]
    [ComVisibleAttribute(true)]
    public class HScrollBar : ScrollBar

    To create the VScrollBar Class (Vertical Scroll), use the coding:

    [ComVisibleAttribute(true)]
    [ClassInterfaceAttribute(ClassInterfaceType.AutoDis patch)]
    public class VScrollBar : ScrollBar

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48