CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007
    Posts
    37

    Scroll bars for Pictur Box?

    Can any one tell me how to add Scroll Bars to Picture Box?
    Thanks in advance.

  2. #2
    Join Date
    Oct 2006
    Location
    Timisoara, Romania
    Posts
    123

    Re: Scroll bars for Pictur Box?

    Use HScrollBar and VScrollBar objects. You can link them to the PictureBox like this:

    First, whenever you load a picture - set the dimensions of the scroll bars or enable/disable them.

    Implement your custom paint method so that the image inside the picture box is drawn at coordinates that depend on the values of the scroll bars.

    Whenever a scroll bar receives a scroll event, refresh the picture box.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured