473,395 Members | 1,688 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,395 software developers and data experts.

Basic Question

Hi all,

Just doing my first VB.NET windows app. It has half a
dozen forms and not alot else. When I do a release and
run the exe that has been built (which works fine), I go
to close it by clicking on the X it closes (or appears
to). Infact it is still running in the processes. What
am I doing wrong?
Should there be an application.onclose procedure,
unfortunately I can't find anything on the net and I don't
have any books (i'm flying very blind!).

TIA

Sarah

Nov 20 '05 #1
5 971
first some questions
1: when you are in debug mode, do you get the same behaviour? (not returning
to the editing mode)
2: how do you call the forms? probably you are leaving some forms open in
the background but its hard to tell like this

eric

"Sarah" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...
Hi all,

Just doing my first VB.NET windows app. It has half a
dozen forms and not alot else. When I do a release and
run the exe that has been built (which works fine), I go
to close it by clicking on the X it closes (or appears
to). Infact it is still running in the processes. What
am I doing wrong?
Should there be an application.onclose procedure,
unfortunately I can't find anything on the net and I don't
have any books (i'm flying very blind!).

TIA

Sarah

Nov 20 '05 #2
"Sarah" <an*******@discussions.microsoft.com> schrieb
Just doing my first VB.NET windows app. It has half a
dozen forms and not alot else. When I do a release and
run the exe that has been built (which works fine), I go
to close it by clicking on the X it closes (or appears
to). Infact it is still running in the processes. What
am I doing wrong?
Should there be an application.onclose procedure,
unfortunately I can't find anything on the net and I don't
have any books (i'm flying very blind!).


Does this also happen in the IDE? If it does, go into pause mode and have a
look at the callstack and the thread window to find out what is going on.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
Thanks for your replies.

It was doing it in the IDE, and when I did a break it
wasn't in a loop (As i don't have any!) but instantiating
the form. The solution, I found was to put
Application.Exit in each of the form's 'closing' event.

I don't know if this is perfect but it works both in the
IDE and exe.

I was opening forms using the

Dim form as new form2()
form.show()

Code, which is what everybody seems to advise.

Thanks for your help

Regards,

Sarah

-----Original Message-----
"Sarah" <an*******@discussions.microsoft.com> schrieb
Just doing my first VB.NET windows app. It has half a
dozen forms and not alot else. When I do a release and
run the exe that has been built (which works fine), I go
to close it by clicking on the X it closes (or appears
to). Infact it is still running in the processes. What
am I doing wrong?
Should there be an application.onclose procedure,
unfortunately I can't find anything on the net and I don't have any books (i'm flying very blind!).
Does this also happen in the IDE? If it does, go into

pause mode and have alook at the callstack and the thread window to find out what is going on.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

.

Nov 20 '05 #4
"Sarah" <an*******@discussions.microsoft.com> schrieb
Thanks for your replies.

It was doing it in the IDE, and when I did a break it
wasn't in a loop (As i don't have any!) but instantiating
the form. The solution, I found was to put
Application.Exit in each of the form's 'closing' event.

I don't know if this is perfect but it works both in the
IDE and exe.

I was opening forms using the

Dim form as new form2()
form.show()

Code, which is what everybody seems to advise.


Is there one Form that lives from the start til the end of the application?
If there isn't, when do you expect the application to close? When all Forms
have been closed? In this case you have to keep track of all open forms,
handle their closed events and call Application.ExitThread (not
Application.Exit) as soon as the _last_ Form has been closed, not whenever
any Form has been closed.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
* "Sarah" <an*******@discussions.microsoft.com> scripsit:
It was doing it in the IDE, and when I did a break it
wasn't in a loop (As i don't have any!) but instantiating
the form. The solution, I found was to put
Application.Exit in each of the form's 'closing' event.

I don't know if this is perfect but it works both in the
IDE and exe.
That's a really brutal way that works.

I was opening forms using the

Dim form as new form2()
form.show()

Code, which is what everybody seems to advise.


That should not be the problem.

--
Herfried K. Wagner [MVP]
<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

6
by: pauldepstein | last post by:
I am reading Grimshaw and Ortega's "C++ and Numerical Methods." They construct a vector class which contains the variable vec, a float* variable where the length of the array (number of...
6
by: DH | last post by:
I have a VERY basic question about figuring database size. I've inherited a database which is generally similar to this basic one: Item, Red, Blue, Green, Yellow (text), (int),(int),(int),(int)...
9
by: Malcolm | last post by:
After some days' hard work I am now the proud possessor of an ANSI C BASIC interpreter. The question is, how is it most useful? At the moment I have a function int basic(const char *script,...
4
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time...
13
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the...
5
by: Aussie Rules | last post by:
Hi, Having a mental block on this one. Have done it before but can't rack my brain on how... I have an object, with a bunch on property, and I add that object to a combo box. I want the...
4
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, ...
1
by: frankhanretty | last post by:
Do I have to install Visual basic on the remote terminals as I did on the server? I have an visual basic 5 application running fine on my client's server and he is now networked. He wants to run the...
4
by: Chris Asaipillai | last post by:
Hi there My compay has a number of Visual Basic 6 applications which are front endeed onto either SQL Server or Microsoft Access databases. Now we are in process of planning to re-write these...
3
by: Scott Stark | last post by:
Hello, I'm trying to get a better handle on OOP programming principles in VB.NET. Forgive me if this question is sort of basic, but here's what I want to do. I have a collection of Employee...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.