473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Additional information: Cannot access a disposed object named

I get an error message since i installed visual studio 2003 :-(

Please help me why i get this message?

An unhandled exception of type 'System.ObjectDisposedException' occurred in
system.windows.forms.dll

Additional information: Cannot access a disposed object named
"DataGridTextBox".

I get this after this syntax... i have no idea why i get this..

has anywhere a idea?

private void dataGridFiBuMandantDetail_Click(object sender,
System.Windows.Forms.MouseEventArgs e)

{

// Bei Klick soll eine Detailmaske aufgehen

// Abfragen ob der Event gestartet werden darf

if (strEventMouseDown == "ON")

{

//string str = null;

Point pt = new Point(e.X, e.Y);

DataGrid.HitTestInfo hti = dataGridFiBuMandant.HitTest(pt);

// Rechte Maustaste

if(e.Button == MouseButtons.Right)

{

MessageBox.Show("Bitte mit der linken Maustaste anklicken, \n" +

"um das Detail dieser Zeile anzuzeigen. \n"+

"Das Löschen mit der Maus erfolgt später.");

}

// Linke Maustaste

if ((e.Button == MouseButtons.Left) && (hti.Type ==
DataGrid.HitTestType.Cell))

{

frmHauptmenue.StrMandant = (dataGridFiBuMandant[hti.Row, 1].ToString());

frmHauptmenue.IntMandantID = (int)(dataGridFiBuMandant[hti.Row, 0]);

this.Close();

}

}

}


Nov 15 '05 #1
2 4271

Hi,

There's too less code for figuring out what's happening. It's a runtime
error, so what's the line where this error occures? What was the previous
actions you did before the error occured?

Most probably the "Dispose" method of the form is started (this.Close()
?????), and that disposes all your controls on the form, and after that you
are trying to call some method that refers some contol.

--
Horatiu Ripa

"michael Schindler" <mr******@hotmail.com> wrote in message
news:uL**************@TK2MSFTNGP11.phx.gbl...
I get an error message since i installed visual studio 2003 :-(

Please help me why i get this message?

An unhandled exception of type 'System.ObjectDisposedException' occurred in system.windows.forms.dll

Additional information: Cannot access a disposed object named
"DataGridTextBox".

I get this after this syntax... i have no idea why i get this..

has anywhere a idea?

private void dataGridFiBuMandantDetail_Click(object sender,
System.Windows.Forms.MouseEventArgs e)

{

// Bei Klick soll eine Detailmaske aufgehen

// Abfragen ob der Event gestartet werden darf

if (strEventMouseDown == "ON")

{

//string str = null;

Point pt = new Point(e.X, e.Y);

DataGrid.HitTestInfo hti = dataGridFiBuMandant.HitTest(pt);

// Rechte Maustaste

if(e.Button == MouseButtons.Right)

{

MessageBox.Show("Bitte mit der linken Maustaste anklicken, \n" +

"um das Detail dieser Zeile anzuzeigen. \n"+

"Das Löschen mit der Maus erfolgt später.");

}

// Linke Maustaste

if ((e.Button == MouseButtons.Left) && (hti.Type ==
DataGrid.HitTestType.Cell))

{

frmHauptmenue.StrMandant = (dataGridFiBuMandant[hti.Row, 1].ToString());

frmHauptmenue.IntMandantID = (int)(dataGridFiBuMandant[hti.Row, 0]);

this.Close();

}

}

}


Nov 15 '05 #2
The problem is that:

I think the new framework version is my problem...
New i have 1.1 with vs 2003

And i think the event mousedown is the problem.

My code in short version..whit the same error:

private void dataGridFiBuMandantDetail_Click(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Close();
}

if you have a solution..please help me..

thanks

michael
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ryan Park | last post by:
Hi, //SITUATION I got a panel control that hold a certain position on a form. Every controls or UIs are on this panel. At certain situation, I called dispose() method of this panel control...
5
by: D Witherspoon | last post by:
I use the following code to open up a form. ------------------------------------------------------- If fImage Is Nothing Then fImage = New frmImage End If fImage.Show()
0
by: Asaf | last post by:
Hi, When I am doing a POST to a SSL URL I am getting this error on first attempt "Cannot access a disposed object named "System.Net.TlsStream"." After the first attempt all works fine, here is the...
0
by: Mackuack | last post by:
Hello everybody i have the following code to access an application via https: --------------------------------------------- System.Net.ServicePointManager.CertificatePolicy = new...
2
by: SMike | last post by:
I post this message again as I didn't get an answer back. I would appriciate any ideas. I am getting the following error when sending a first https request: Cannot access a disposed object...
5
by: mthgk | last post by:
I have a C# MDI app. The child forms do alot of work, so this work is perfomed on a different thread created using ThreadPool.QueueUserWorkItem(). Because the status of the work is important to...
3
by: Tracey | last post by:
Hi, there I met a very wierd problem. My startup form say Form1 has a datagrid say datagrid1, when I click an item in datagrid1, I wanna show form2. In my code, I achieved that with: private sub...
7
by: ed | last post by:
Hi, Here's my code 'in form WithEvents formReplace As New Form Private Sub cmdFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFind.Clic formReplace.Show(
3
by: Ravindra Tripathi | last post by:
Hi I have a form with a textbox and a close button. whenever I try to close the the form i get an exception "cannot access disposed object named" how do i correct this issue? Ravindra
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.