Using WndProc to catch Shut down

M

milop

Hello.

I'm trying to implement receiving the shut down message when windows is
shutting down.

I see a lot of examples using "Protected Overrides Sub WndProc(ByRef m As
Message".

My app has multiple forms. Do I have to code this is every form?

Thanks in advance,

Mike
 
A

Armin Zingler

milop said:
Hello.

I'm trying to implement receiving the shut down message when windows
is shutting down.

I see a lot of examples using "Protected Overrides Sub WndProc(ByRef
m As Message".

My app has multiple forms. Do I have to code this is every form?

See Application.AddMessageFilter.


Armin
 
A

Armin Zingler

milop said:
Hello.

I'm trying to implement receiving the shut down message when windows
is shutting down.

I see a lot of examples using "Protected Overrides Sub WndProc(ByRef
m As Message".

My app has multiple forms. Do I have to code this is every form?

See Application.AddMessageFilter.


Armin
 
H

Herfried K. Wagner [MVP]

milop said:
I'm trying to implement receiving the shut down message when windows is
shutting down.

I see a lot of examples using "Protected Overrides Sub WndProc(ByRef m As
Message".

My app has multiple forms. Do I have to code this is every form?

Check out the documentation on 'SystemEvents.SessionEnding'.
 
H

Herfried K. Wagner [MVP]

milop said:
I'm trying to implement receiving the shut down message when windows is
shutting down.

I see a lot of examples using "Protected Overrides Sub WndProc(ByRef m As
Message".

My app has multiple forms. Do I have to code this is every form?

Check out the documentation on 'SystemEvents.SessionEnding'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top