Ecco il codice dell'errore:
System.ArgumentException was unhandled
Message="Parametro non valido."
Source="System.Drawing"
StackTrace:
in System.Drawing.Graphics.GetHdc()
in System.Drawing.BufferedGraphics.RenderInternal(Han dleRef refTargetDC, BufferedGraphics buffer)
in System.Drawing.BufferedGraphics.Render()
in System.Windows.Forms.Control.WmPaint(Message& m)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
in System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.Run(ApplicationCo ntext context)
in Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
in Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
in Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
in DesktopMultiLayer.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:riga 81
in System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
in System.Threading.ThreadHelper.ThreadStart_Context( Object state)
in System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
InnerException: