473,568 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error Unloading Form

I am using command Me.Closed()in Event of TreeView
AfterSelect.

This below is Error Message appear.

An unhandled exception of type 'System Object Disposed
Exception' occured in system.windows. forms.dll

Additonal Information : Cannot access a disposed object
named "Treeview".
Nov 20 '05 #1
5 1822
Cor
Hi Wittaya,
Can you look if me.close gives the effect you want?
Cor
Nov 20 '05 #2
"Wittaya" <wi*****@multia irservices.com> schrieb
I am using command Me.Closed()in Event of TreeView
AfterSelect.

This below is Error Message appear.

An unhandled exception of type 'System Object Disposed
Exception' occured in system.windows. forms.dll

Additonal Information : Cannot access a disposed object
named "Treeview".


I think I remember reading a solution that enabled a timer, fired directly
after the AfterSelect event because you can not close the form in this event
handler (and in other handlers). In the timer's tick event, Me.Close is
called.
--
Armin

Nov 20 '05 #3
"Cor" <no*@non.com> scripsit:
Can you look if me.close gives the effect you want?


;-)

There is no 'Me.Closed()' method...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Cor
Herfried,
I thought of that when I had sended it, and then you cannot correct it and
did not know how to correct it and then I saw the message from Armin and
thougth what can I do more.
:-)
Cor.
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> schreef in bericht
news:eO******** ******@TK2MSFTN GP10.phx.gbl...
"Cor" <no*@non.com> scripsit:
Can you look if me.close gives the effect you want?


;-)

There is no 'Me.Closed()' method...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
"Cor" <no*@non.com> scripsit:
I thought of that when I had sended it, and then you cannot correct it and
did not know how to correct it and then I saw the message from Armin and
thougth what can I do more.


ROFL again.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

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

Similar topics

1
1620
by: LilleSkutt | last post by:
I want to use assemblies (Window Forms as .dll) so that I can replace the form while the main application is running. To accomplish this, I used Assembly.LoadForm to manually load the assembly when I need it from a .DLL file. I then use CreateInstance to create the instance of the class, and then use the instance like I would use is with a normal...
9
4416
by: Rom Marshall | last post by:
Hi. Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD utility to unload the data off the tables for DB2 7.1 on OS/390. Instead, the documentation refers to a sample C++ program -- DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose. I'm wondering if anyone out there has a COBOL equivalent to this as I do not have a C++...
2
1598
by: Guru Prasad | last post by:
Is there a delay involved in unloading assemblies once a virtual directory is "deleted" using IIS Manager ? At times even after the virtual directory is removed i cannot delete the backing physical directory and it looks like ASPNET runtime is holding on to the assemblies. Once i recycle the ASPNET process, i can delete this directory. Has...
10
1732
by: peter hansen | last post by:
I tried a couple of weeks ago but I'll try again :D I old VB6-days it was possible to unload a form bu using the Unload(Form) command. I have tried the Close-function but it'll unload the entire projekt. The reason why I am asking is that I am creating a program and I need a Splash-screen (like the tiny screen that appears when programs...
0
1588
by: ITALstudio s.r.l. | last post by:
Hy, In my application I create instances of windows forms into different AppDomain. If I repeat 5 times the following sequence: - Creating AppDomain; - Creating instance of windows form into AppDomain;
2
4210
by: RajaKannan | last post by:
Hi All, I have a form in which i have few mandatory fields. Wheneve the user tries to save, i check for these fields and alert them, if thet are empty. I have a CLOSE button in my form and whenever the user clicks the CLOSE button, i ask the user whether he wants to save before closing the form. On the Form_Unload event, i check whether...
18
1674
by: Fester Bestertester | last post by:
Greetings, I'm an occasional php/mysql dabbler. I have a basic data form with a submit button. Unfortunately, it's still possible for the user to enter data changes and close the window, without clicking the submit button, thus losing the data. Can someone point me to a generic example of some code that will trap and handle this error?
0
1298
vdraceil
by: vdraceil | last post by:
Hi,i use VB6.0..is it possible to prevent a form from unloading ever? I know to set cancel=true in query unload event of the form..but this applies only to limited cases. If my exe is closed from the task manager-"Applications" tab,i can detect it and prevent it from unloading,but if it is closed from the task manager-"Processes" tab,the form...
6
2043
vdraceil
by: vdraceil | last post by:
I use vb6.i have a small problem guys..my form is not unloading. I want my application to end only if the user presses shift+F10.so i run a timer with interval=1 which checks the keyboard state of both the keys.if at any instant both the keys are pressed a messagebox must be displayed and then the form must unload. I've done the coding and...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6275
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.