Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Something weird happening?

Posted on 1999-07-31
11
Medium Priority
?
126 Views
Last Modified: 2010-04-04
I didn't assign anything on mainform.onclose(surely I didn't write there canclose:=false), but my app stops the windows from any kind of restart or shutdown. WHERE IS Mr MULDER when you need him?
0
Comment
Question by:duke_n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 1392204
Hi,
try adding this to your program:

procedure WMQueryEndSession(var Msg: TWMQueryEndSession);  message WM_QUERYENDSESSION ;


procedure TForm1.WMQueryEndSession(var Msg: TWMQueryEndSession);
const
  CONTINUE_SHUTDOWN = 1 ;
begin
  inherited ;
Msg.Result := CONTINUE_SHUTDOWN
end;

see if that helps.
0
 
LVL 1

Author Comment

by:duke_n
ID: 1392205
I WANT TO BELIEVE this worx
:-)
0
 
LVL 1

Author Comment

by:duke_n
ID: 1392206
NOPE. It doesn't ):
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 17

Expert Comment

by:inthe
ID: 1392207
Does that suggest it's not working still :-(
if your code not to big or if you can replicate the problem send a demo of it to me at Legend@Enterprise.Net and i'll have a look .
on  the WMQueryEndSession do a showmessage im closing or something to see if your program get notifies of the system close.

is there a loop running anywhere etc.

0
 
LVL 1

Author Comment

by:duke_n
ID: 1392208
no.
there is no loop.
there is a timer on though...
and my program IS big enuff not to send it
0
 
LVL 17

Expert Comment

by:inthe
ID: 1392209
did you try turning off the timer ?
al else i can suggeest is to recreate the program peice by piece untill you find the offenind part that stops the reboot.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1392210
Are you using 3rd party (or own made) components in you project?
0
 
LVL 1

Author Comment

by:duke_n
ID: 1392211
I do use those.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1392212
Maybe one of them fails to free itself.
0
 
LVL 1

Author Comment

by:duke_n
ID: 1392213
maybe it does...
anyway, here what I did:
in that little procedure Inthe offered, I put an <application.terminate;>after <inherited;>.
You, big and professinal programmerz may call this ugly and improfessional, but this WORKS.period :-).
I think inthe deserves the points... plz submit yer answer
0
 
LVL 17

Accepted Solution

by:
inthe earned 60 total points
ID: 1392214
ok cheers and glad it works :-)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question