Hi,
here is my problem: I have created panel and put picBox in it. AutoScroll for panel is on, so the scrollbars are there. When scrollbars come to the limit, pictureBox is fitted with new image. Image is loaded correctly, but scrollbars rest in last position, i.e. they don't come to position x=0,y=0 as wanted.
Any ideas?
pete

Recommended Answers

All 8 Replies

Please attach picture to what happened to understand you well.

Reset the scroll bars:

panel1.AutoScrollPosition = new Point(0, 0);

Thanks sknake,
but I still have problem, my scroll bars move faster than my image on picBox, so I have sort of delay ...
Have any ideas on this?

I guess that depends on how large the image is, how fast your computer is, etc etc. Please upload a sample project for that question (be sure we can compile it and see the problem).

sknake,

there is whole sln attached, check it out.

How do you find the application to run it on the emulator .. or can I move this code over to a winforms project and see the same behavior? I haven't used the mobile emulators before

I'have rearranged code and zipped it.
You go with F5 and choose Win mobile 5.0 emulator from the menu, the rest is ok.

It seems to scroll fine for me except when a new picture is about to load. I don't know the capabilities of programming for mobile devices but you could load the surrounding images up in another thread so it lets them scroll to the end of the image instead of hanging up before you get to the end.

I think a worker thread would solve the behavior you're going after.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.