Ripper (7) [Avatar] Offline
#1
I have a problem when my application tries to display an image in actual size. At first it all looks right, but when I start to scroll the result is not as expected. The part of the image that is revealed by scrolling is not drawn right, but since the scrolling is handled by the framework I don't know what to do, I cannot find my mistake smilie ...
Any help will be appreciated.
Sincerely,
Nikolay
eebrown (89) [Avatar] Offline
#2
Re: Actual Size and Scrolling
Are you referencing the application in the book, or your own app? It sounds like your own app, in which case I'd need to better understand what exactly you are trying to do.

Have you read through chapter 17? I go through the ScrollablePictureBox example there (in Windows Forms in Action), which likely deals with the same issues.

Erik
Ripper (7) [Avatar] Offline
#3
Re: Actual Size and Scrolling
Actually it was about the application in the book, but I found my mistake. When I was drawing the image I had been using this.AutoScrollPosition instread of pnlPhoto.AutoScrollPosition.
eebrown (89) [Avatar] Offline
#4
Re: Actual Size and Scrolling
Ah, makes sense. Glad you found the problem.
dmwysocki (5) [Avatar] Offline
#5
Re: Actual Size and Scrolling
I made the same mistake. Thanks for the post. My problem is fixed and I can move on.