Estoy intentando cerrar un formulario y al aplicar el método Me.Close() me enviar un error
Ya e intendado de todo y el error no desaparece. el formulario herada de otra ventana. Leí en otros sitios que hay que eliminar este metodo
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
'If disposing AndAlso components IsNot Nothing Then
' components.Dispose()
'End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
Pero no funciono, sigue igual. En el formulario solo tengo controles de texto y botones no tengo grillas ni conexiones a base de datos.
Esta es la excepción completa
System.ArgumentNullException was unhandled HResult=-2147467261 Message=Value cannot be null. Parameter name: dataSource ParamName=dataSource Source=System.Windows.Forms StackTrace: at System.Windows.Forms.BindingContext.HashKey..ctor(Object dataSource, String dataMember) at System.Windows.Forms.BindingContext.GetKey(Object dataSource, String dataMember) at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember) at System.Windows.Forms.BindingContext.get_Item(Object dataSource) at Janus.Windows.GridEX.GridEX.a(Object , String , Boolean ) at Janus.Windows.GridEX.GridEX.set_DataSource(Object value) at Janus.Windows.GridEX.GridEX.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Control.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Control.Dispose(Boolean disposing) at System.Windows.Forms.Form.Dispose(Boolean disposing) at BaseForms.FormBaseGetPending.Dispose(Boolean disposing) in C:\git\scientific_application_framework_2\BaseForms\FormBaseGetPending.designer.vb:line 13 at System.Windows.Forms.Form.WmClose(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32 wparam, Int32 lparam) at System.Windows.Forms.Form.Close() at frmVSwb.FormVSwbCandidateButtons.ExitToolStripMenuItem_Click(Object sender, EventArgs e) in C:\git\vessel_scheduling_app_i2\frmVSwb\FormVSwbCandidateButtons.vb:line 554 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Form.ShowDialog(IWin32Window owner) at wcVSwinConsole.Main.Main() in C:\git\vessel_scheduling_app_i2\wcVSwinConsole\Main.vb:line 14 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: