Dont know the application switches to my form that makes use of odbc when I close the application.

protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

As I step through, when it gets to components.Dispose(), it goes to

private void TerminalStatus_SelectedIndexChanged(object sender, EventArgs e)//START OF GRIDVIEW 3(PROGRESS REPORT)
        {// LOAD AND VIEW THE STATUS OF EACH TERMINAL, THIS IS READ FROM A CSV FILE.

Okay on the form is a combobox that binds data from a DB. If I dispose the combobox control, in the Dispose Method, then the app closes properly...but do i really need to add a line of code for that? It worked fine before - lol.

Could this possibly be an order of execution problem?

I imagine something else is being disposed before your combo box, which changes the selected index? (Any other data-binding anywhere?)
If so, this would cause your event to fire before the control was disposed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.