开发者

Windows form throws Argument exception when the control size is larger in design mode

I have a third party control on windows forms and the third party control(Control size (829px,1169px)) is rendered based on Measurement unit pixel. I have changed its measurement unit to centimeter in order to render the control in centimeter. After changing the measurement unit i have moved the control through mouse to place it in desired location while moving the control the "Argument Exception was unhandled" exception is thrown by the Method Bitmap(width= 34000cm,height = 45000cm). This exception is thrown only when the form has default size. I have changed the size of the form to maximum size and again i move the control, now the control is moved without any exceptions but little bit slower. I don't know why this exception is raised when the form is in default size?

Is the .net renders the control based on the form size ?

whether this is issue in net or not? Note: Control runs perfect during runtime while changing Measurement unit.....

Can any one help me on this?????

I have posted my stack strace with this question.

Thanks in advance..............

Windows form throws Argument exception when the control size is larger in design mode

Stack strace:

System.ArgumentException was unhandled

Message="Parameter is not valid." Source="System.Drawing" StackTrace: at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at Syncfusion.Windows.Forms.Diagram.LayoutGrid.Draw(Graphics grfx, RectangleF rectGrid) in C:\Users\amsathm\Desktop\Source\Trunk\Base\Entities\LayoutGrid.cs:line 495 at Syncfusion.Windows.Forms.Diagram.View.Draw(Graphics grfx, RectangleF rectClip) in C:\Users\amsathm\Desktop\Source\Trunk\Base\MVC\View.cs:line 1891 at Syncfusion.Windows.Forms.Diagram.Controls.Diagram.OnPaint(PaintEventArgs e) in C:\Users\amsathm\Desktop\Source\Trunk\Windows\Controls\Diagram.cs:line 4152 at Syncfusion.Windows.Forms.ScrollControl.OnEnsurePaintCodeJitted() at Syncfusion.Windows.Forms.ScrollControl.EnsurePaintCodeJitted(Boolean ignoreVisible) at Syncfusion.Windows.Forms.ScrollControl.OnHandleCreated(EventArgs e) at System.Windows.Forms.Control.WmCreate(Message& m) at Syste开发者_StackOverflowm.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Diagram.Controls.Diagram.WndProc(Message& m) in C:\Users\amsathm\Desktop\Source\Trunk\Windows\Controls\Diagram.cs:line 4836 at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

enter code here


Bitmap constructor could throw ArgumentException when PixelFormat value is specified whose name does not start with Format. Please verify what value is being passed, use the format that starts with Formatxxx.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜