PDA

Click to See Complete Forum and Search --> : Disable "Ending Program" in windows XP?


mike2
Mar 3rd, 2004, 10:38 AM
Hi.Is there a way to disable the "Ending Program" screen when Windows XP shuts down?I want to do this because I want to make a program in VB that will copy some files into my LAN computer when it unloads.
So because windows will see that it "doesnt want" to end windows will wait a little and then close the program...
But actually i havent tried it testing this so Im not sure if this Ending Program screen would appear but im guessing...:rolleyes:

nemaroller
Mar 3rd, 2004, 10:16 PM
Shut Down Service: You, shut down!

Your Program: I have to do something first.

Shut Down Service: May it quick!

Your Program: No problem.

Shut Down Service: You done yet?

Your Program: What? No not yet, just started..

Shut Down Service: Come on already..

Your Program: Wait just one second, still working on it...

Shut Down Service: Jesus christ, what the hell are you doing anyway?

Your Program : Just copying some files over the lan..

Shut Down Service: Fine.. I'll popup an Ending Program box...

Your Program: Thanks

Shut Down Service: Right. Right.

< 2 seconds pass>

Shut Down Service: We kosher?

Your Program: Almost.

Shut Down Serivce: Ok thats it, I can't help you out any longer.
You shut down, or I'll shut you down the hard way.

Your Program: Huh? Chill... almost done.

Shut Down Service: I've had enough of YOO!


Shut Down Service (to Windows): We're all ready here.

Windows: You sure? I still see some lan activity.

Shut Down Service: This jerk won't shut down.

Windows: You, program!

Your Program: Hi Windows!

Windows: Shut Down!

Your Program: Yes sir, just doing some very important stuff here.

Windows: Are you are Microsoft program?

Your Program: Um... why yes I am.

Windows: BS! Let me see your certificate!

Your Program: Its laying around here somewhere..

Windows: Yea right. Shut him down!

Shut Down Service: Gladly!

Your Program: Wait three more bytes and I'm...

<silence>

Windows: We all good here?

Shut Down Service: I think so. Hey, just for fun, want to send out an error report?

Windows: Hell yea!

Ideas Man
Mar 3rd, 2004, 11:28 PM
If it can't close the program, the prompt just stays on the screen, you can do something to the form_unload to prevent it from doing this and then allow it when it's finished.

MartinLiss
Mar 4th, 2004, 11:26 PM
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

Select Case UnloadMode
Case vbFormControlMenu
strMess = "The user chose the Close command (the "X") from the Control menu on the form."
Case vbFormCode
strMess = "The Unload statement is invoked from code."
Case vbAppWindows
strMess = "The current Microsoft Windows operating environment session is ending."
Case vbAppTaskManager
strMess = "The Microsoft Windows Task Manager is closing the application."
Case vbFormMDIForm
strMess = "An MDI child form is closing because the MDI form is closing."
Case vbFormOwner
strMess = "A form is closing because its owner is closing."
End Select

End Sub

Ideas Man
Mar 5th, 2004, 12:59 AM
That's it, very nicely done Martin.

manavo11
Mar 5th, 2004, 11:31 AM
Case vbFormControlMenu
strMess = "The user chose the Close command (the "X") from the Control menu on the form."

Should be :

Case vbFormControlMenu
strMess = "The user chose the Close command (the ""X"") from the Control menu on the form."

otherwise there is an error ;)