T
Tony Lugg
I have a UserControl with AutoScroll and a PictureBox that I load
images into. The PictureBox is set to stretch the image, and in order
to achieve a zoom effect, the PictureBox is made bigger (or smaller if
zooming out). This works fine, except that with a large image I
eventually get an exception. NOTE: I was using DrawImage initially
but performance was poor.
However, the exception is not being generated at the line where the
PictureBox is enlarged...the system seems to syspend for a few
seconds, then an error is generated stating:
<<An unhandled exception of type
'System.ComponentModel.Win32Exception' occurred in
system.windows.forms.dll
Additional information: The operation completed successfully>>
Thanks for that additional information!
I cannot seem to trap this error as it is happening at the very first
line of the form definition "Public Class MyForm". Obviously, this
would generate a run-time issue for my application. I have 2
questions:
1. What are the size limits for a PictureBox?
2. How can I trap an error that seems to occur at the form level.
Thanks in advance.
images into. The PictureBox is set to stretch the image, and in order
to achieve a zoom effect, the PictureBox is made bigger (or smaller if
zooming out). This works fine, except that with a large image I
eventually get an exception. NOTE: I was using DrawImage initially
but performance was poor.
However, the exception is not being generated at the line where the
PictureBox is enlarged...the system seems to syspend for a few
seconds, then an error is generated stating:
<<An unhandled exception of type
'System.ComponentModel.Win32Exception' occurred in
system.windows.forms.dll
Additional information: The operation completed successfully>>
Thanks for that additional information!
I cannot seem to trap this error as it is happening at the very first
line of the form definition "Public Class MyForm". Obviously, this
would generate a run-time issue for my application. I have 2
questions:
1. What are the size limits for a PictureBox?
2. How can I trap an error that seems to occur at the form level.
Thanks in advance.