473,474 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Premature Ending of App

I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of the
calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul
Dec 27 '06 #1
8 1074
Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
>I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of the
calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul

Dec 27 '06 #2
Cor,
It's a single form app that contains a Datagrid for display of Data then
the "report Button" builds a string & the report. The odd thing is I have
another version of this that works OK when I close the report preview the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
>>I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul


Dec 27 '06 #3
Paul,

And is the report preview on an other form
(check if that is showed with show or with showdialog on both applications
then)

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:eP**************@TK2MSFTNGP06.phx.gbl...
Cor,
It's a single form app that contains a Datagrid for display of Data then
the "report Button" builds a string & the report. The odd thing is I have
another version of this that works OK when I close the report preview the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
>Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
>>>I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul



Dec 27 '06 #4
Cor,
The report buttons call the same class that runs the .ShowDialog(),
that's why it seems to be in the calling form's settings somewhere? Both
form's command buttons are calling the same class in the same way but one
closes the app and 1 doesn't.
The form is pretty complex or I would just recreate it. I'm going to try a
fresh button and see what happens.
"Cor Ligthert [MVP]" <no************@planet.nl>e app and 1 doesnt
wrote in message news:%2***************@TK2MSFTNGP04.phx.gbl...
Paul,

And is the report preview on an other form
(check if that is showed with show or with showdialog on both applications
then)

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:eP**************@TK2MSFTNGP06.phx.gbl...
>Cor,
It's a single form app that contains a Datagrid for display of Data then
the "report Button" builds a string & the report. The odd thing is I have
another version of this that works OK when I close the report preview the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
>>Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl.. .
I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul



Dec 27 '06 #5
Cor....
I recreated the calling button and it worked fine.... Now I'll never know
why, but it's fixed. Thanks for your help.....
Paul
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Paul,

And is the report preview on an other form
(check if that is showed with show or with showdialog on both applications
then)

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:eP**************@TK2MSFTNGP06.phx.gbl...
>Cor,
It's a single form app that contains a Datagrid for display of Data then
the "report Button" builds a string & the report. The odd thing is I have
another version of this that works OK when I close the report preview the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
>>Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl.. .
I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul



Dec 27 '06 #6
Paul Ilacqua wrote:
Cor....
I recreated the calling button and it worked fine.... Now I'll never know
why, but it's fixed. Thanks for your help.....
Paul
Check the Forms AcceptButton and CancelButton properties and also check
the DialogResult property of the button that causes it to close.

Chris

Dec 28 '06 #7

Paul Ilacqua wrote:
Cor....
I recreated the calling button and it worked fine.... Now I'll never know
why, but it's fixed. Thanks for your help.....
Paul
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Paul,

And is the report preview on an other form
(check if that is showed with show or with showdialog on both applications
then)

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:eP**************@TK2MSFTNGP06.phx.gbl...
Cor,
It's a single form app that contains a Datagrid for display of Data then
the "report Button" builds a string & the report. The odd thing is I have
another version of this that works OK when I close the report preview the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and then
close the preview... it exits the application. I have 2 versions of the
program 1 that exits and 1 that doesn't. I've scoured the properties of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul


I think a possible reason for this could be:

When you call a form such as Form1.Showdialog, the code is paused from
where it was ran from, eg.

Me.hide()
Form1.Showdialog()
Me.close()

In this code the procedure would be paused at the line of
Form1.Showdialog()

However, the code will be resumed if the instance of Form1 is closed,
so Me.Close will happen, along with the rest of the procedure.

Dec 29 '06 #8
Kimera,

I think the most possible problem is as Chris wrote, there has been a bug in
the OK and Cancel button part of the form class. I don't know if it is
already fixed.

Cor

<Ki***********@gmail.comschreef in bericht
news:11**********************@i12g2000cwa.googlegr oups.com...
>
Paul Ilacqua wrote:
>Cor....
I recreated the calling button and it worked fine.... Now I'll never
know
why, but it's fixed. Thanks for your help.....
Paul
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Paul,

And is the report preview on an other form
(check if that is showed with show or with showdialog on both
applications
then)

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:eP**************@TK2MSFTNGP06.phx.gbl...
Cor,
It's a single form app that contains a Datagrid for display of Data
then
the "report Button" builds a string & the report. The odd thing is I
have
another version of this that works OK when I close the report preview
the
app stays open.
What tells the app to close when a report preview or any other form is
closed?
Thanks for the response.

Paul

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:Oy**************@TK2MSFTNGP03.phx.gbl...
Paul,

How many forms do you use and what is the purpose of those.

Cor

"Paul Ilacqua" <pi******@twcny.rr.comschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl.. .
I have a single form VB.NET program that prints some data using
PrintDocument class. The problem is when I preview the document and
then
close the preview... it exits the application. I have 2 versions of
the
program 1 that exits and 1 that doesn't. I've scoured the properties
of
the calling form and sure I can't find where the issue could be.
I appreciate any light someone could shed on where to begin.

Paul



I think a possible reason for this could be:

When you call a form such as Form1.Showdialog, the code is paused from
where it was ran from, eg.

Me.hide()
Form1.Showdialog()
Me.close()

In this code the procedure would be paused at the line of
Form1.Showdialog()

However, the code will be resumed if the instance of Form1 is closed,
so Me.Close will happen, along with the rest of the procedure.

Dec 29 '06 #9

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

Similar topics

3
by: Seagull Manager | last post by:
Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions on apache manual and php manual (as far as I can see), but getting "internal server error" in browser... log says "Premature...
1
by: Jason Ho-Ching | last post by:
Can anyone tell me about this error I am getting? Premature end of script headers: main.php Thanks! ##-----------------------------------------------## Article posted from PHP Freaks...
1
by: Wayne Deleersnyder | last post by:
Hi, I'm a newbie at Perl and CGI and hoping someone can point me in the right direction. Recently I've been going through an older book I have on CGI programming to get a start. Most of it...
4
by: Greg Smith | last post by:
I am working on my first web app. What is the proper way to end the application and close the aspx page? Any help is greatly appreciated.
3
by: Ben R. | last post by:
In an article I was reading (http://www.ftponline.com/vsm/2005_06/magazine/columns/desktopdeveloper/), I read the following: "The ending condition of a VB.NET for loop is evaluated only once,...
2
by: barry.edmund.wright | last post by:
Hi All, I want to build a Find Statement on the fly. The code below starting with 'This Code Works! is fine but as I said I want to build the Me!cboSelect1 & "=" & rs(Me!cboSelect1) portion of...
34
by: Umesh | last post by:
I want to extract a string abc*xyz from a text file. * indicates arbitrary no. of characters. I'm only able to do it when the string has definite no. of characters or the string length is...
4
by: Geethu03 | last post by:
Hi I have a Tomcat 5.5 version and Run many applications using this. One of My Application is upload a file to mysql database, its works fine. My new application is update a file with some...
4
by: ronrsr | last post by:
I inherited this website from another - made some changes, and now, a few pages are ending prematurely. I can not figure out why. Can you help? go to: ...
0
by: jmarcrum | last post by:
Hi all, I have an excel spreadsheet that in column A, has a formula under the first row in A2 that automatically calculates the Week-ending date when someone starts typing something in cells B2,...
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,...
1
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.