-
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..!
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks