Tag: components

什么可能导致双缓冲杀死我的应用程序?

我有一些使用GDI +绘制到屏幕的自定义(winforms)组件。 为了防止重绘闪烁,我决定启用双缓冲,所以我在构造函数中添加了一行: public ColourWheel() { InitializeComponent(); this.DoubleBuffered = true; } 哪个适用于此组件(ColourWheel)。 当我将同一行添加到我的另外两个(结构相似的)组件的构造函数中时,我会得到一些奇怪的症状: 当我尝试运行组件打开的表单时,我在Application.Run(new Form());上获得了一个Argument Exception Application.Run(new Form()); 。 如果我切换到设计模式,我得到一个错误,关于具有未处理的exception的组件与参数。 我是否对其中一个或全部进行双缓冲似乎并不重要,它仍然适用于ColourWheel,但不适用于其他人。 为了记录,我还尝试了一些其他双 缓冲技术。 什么可能导致双缓冲在一个组件上工作,而不是其他组件? 编辑:这是运行时症状的exception细节: System.ArgumentException未处理Message = Parameter无效。 Source = System.Drawing StackTrace:System.Drawing.Graphics.GetHdc(),位于System.Windows.Forms.Control的System.Drawing.BufferedGraphics.Render()的System.Drawing.BufferedGraphics.RenderInternal(HandleRef refTargetDC,BufferedGraphics缓冲区)中。系统中System.Windows.Forms.UserControl.WndProc(Message&m)的System.Windows.Forms.ScrollableControl.WndProc(Message&m)处的System.Windows.Forms.Control.WndProc(Message&m)处的.WmPaint(Message&m) .Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,Int32 msg,IntPtr wparam, IntPtr lparam)在System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&msg)处于System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID,Int32 reason,Int32 pvLoopData)at at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason,ApplicationContext context),位于TestForm.Program.Main()的System.Windows.Forms.Application.Run(Form mainForm)的System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,ApplicationContext context)中D:\ Documents and Settings […]

适用于Windows中的Windows PC的优秀GIS软件或组件?

上周我搜索了很好的免费或开源解决方案和GIS(地理信息系统)组件我创建了一些系统,但没有人满足我的要求 SharpMap是一款非常有缺陷的软件 Gmap.net很慢 MapWindow具有非常复杂的结构并且非常错误。 我创建了uDIG但是在java中,我需要在vb.net或c#中使用解决方案。 任何人都知道一个满足我的要求或有替代品的好解决方案,我接受解决方案?