I am having a first time exception error when I run my code and I can not figure out why. I am very new to Visual Studio and I can not figure out what I am doing wrong.
Since I do not have enough points to post an image, this is the beginning of the error:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>Project Starter.vshost.exe</AppDomain><Exception><ExceptionType>System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Form that is already visible cannot be displayed as a modal dialog box. Set the form's visible property to false before calling showDialog.</Message><StackTrace> at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Project_Starter.frmOrders.btnClose_Click(Object sender, EventArgs e) in F:\MIS 304\Homework\Project Starter\Project Starter\Project Starter\frmOrders.vb:line 70
at System.Windows.Forms.Control.OnClick(EventArgs e)
Does anyone have any idea what is causing this error and how I could fix this?