Re: location property of control not accepting values more than 32767

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Nilesh" <Nilesh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4DEDED26-FE1A-433D-874F-94C2D3AD0BC6@xxxxxxxxxxxxxxxx
> hi , Gerald
> Thanks for the quick response.
> let me tell you the case.
>
> I have a requirement like this.
> I need to display multiple pictureboxes in my application in different
modes
> (line dual window, 4 window, 8 window etc..) . means in dual window mode i
> have to display only 2 "full" pictureboxes in entire client rectangle area
> and when user scrolls next 2 should come up, but at a time only 2 will be
> visible. same case for 4 window mode , at this time 4 pictureboxes will be
> fully visible and other comes up on scroll.
> now in this 1 more option is "show all images". in this i need to create
all
> the pictureboxes but need to display 2 or 4 at a time. i need to create
all
> the pictureboxes bcoz i need to provide navigation also through
pictureboxes.
> means when user clicks on "Next" , next picturebox should gets
highlighted.
> Now in this option i am facing problem which i stated.
>
> Can you please suggest me what should i do?
> Thanks,
> Nilesh
>

What you want is pretty common, and usually when the question about the
limits come up.
Basically, you need to handle the scrolling yourself. In the "show all
images" mode, you would pretty much do exactly what you are doing in the
other mode. Only you would need to keep track of what images need to
currently be displayed and load those as necessary. Like you said, even
though they chose "show all", you are really only showing 2 or 4 at a time.
So you only need 2 or 4 picture boxes on screen. When they choose "Next",
all you do is load up the next block of images into the same picture boxes.

If you wanted to perform smooth scrolling, where you see just portions of
the neighboring pictures, then at most you only need one additional row or
column of picture boxes in the scroll direction. As the user scrolls in the
desired direction, once they hit the point where only entire pictures are
displayed, you kind of snap back.
For example: Let's say you want to scroll smoothly horizontally, but only
display 1 whole picture.
You would want 2 picture boxes. 1 to fill the current screen, and another to
scroll into view.
So at 50% scroll, you would see half of each picture.
Once you scroll the second picture fully into view, you no longer need the
first picture. So discard the first picture, load the second picture into
the first box, and reset your view to show the first box. Now load up the
third picture into the second box so it is ready to scroll into view.

I know it is much more complicated than just creating the whole array of
controls and letting the system handle the scrolling for you. But this is
really the way to do it. And yes, this is how many of the other apps that
handle this do it as well. And it is not just limited to pictures. List
boxes, tree views, and other things that need to perform lots of scrolling
follow the same general concept.

Gerald


.



Relevant Pages

  • Re: cannot change desktop pic
    ... Start, Control Panel, Display, Desktop, Background. ... Are you saying the scroll bar to the right of the Background ... to stop them choosing their own picture as a challenge. ...
    (microsoft.public.windowsxp.general)
  • controlling scrolling in a form programatically
    ... When the user hits the bottom of the screen I want the screen to ... I had a couple of ideas myself - create a "background" picture box ... that is 800*1200 (this then displays scroll bars in the form). ... this means that the status bar gets lost when the screen ...
    (microsoft.public.dotnet.languages.vb)
  • controlling scrolling in a form programatically?
    ... When the user hits the bottom of the screen I want the screen to ... I had a couple of ideas myself - create a "background" picture box ... that is 800*1200 (this then displays scroll bars in the form). ... this means that the status bar gets lost when the screen ...
    (microsoft.public.dotnet.general)
  • Re: Scrolling a picture box.
    ... >I am trying to scroll a picture larger than the screen. ... > I have a form with a panel on it. ... > viewable region for every scroll change - in that case I'll just get rid ...
    (microsoft.public.dotnet.framework.compactframework)
  • Scrolling a picture box.
    ... I am trying to scroll a picture larger than the screen. ... I have a form with a panel on it. ... scroll change - in that case I'll just get rid of the picturebox and copy ...
    (microsoft.public.dotnet.framework.compactframework)