By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,032 Members | 1,163 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,032 IT Pros & Developers. It's quick & easy.

how can i shutdown the cpu from dotnet framework?

P: n/a
hi everone
i want to put button on windows application to shut down
the pc from dot net framework not to use api's
thanks

Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Cor
Hi,
i want to put button on windows application to shut down
the pc from dot net framework not to use api's


There is an old Yiddish joke which goes like this.

Mosh comes at the rabbi and asks "rabbi can God make everything"

And the Rabbi says: "Of course can God make everything he did make the
world"

Than Mosh ask to the rabbi: "rabbi can God make a stone that he cannot raise
himself?

In that joke is a lot of wisdom for me.

A VB.net program needs the framework.

I think the only thing he can do is give command to an Api.

And die when the computer is shut down.

But I can be wrong.

Cor


Nov 20 '05 #2

P: n/a
"mohamed farouk" <to*****@hotmail.com> schrieb
hi everone
i want to put button on windows application to shut down
the pc from dot net framework not to use api's
thanks


You can not do it without API calls. Also have a look at the thread "Turn
off a PC" from yesterday.
--
Armin

Nov 20 '05 #3

P: n/a
Hello,

"mohamed farouk" <to*****@hotmail.com> schrieb:
i want to put button on windows application to shut down
the pc from dot net framework not to use api's
Why not use Windows-API?!

http://msdn.microsoft.com/library/de...tingsystem.asp

http://msdn.microsoft.com/library/de...tingsystem.asp
If possible can u post C# code for doing the


PInvoke solution:

http://www.mentalis.org/soft/class.qpx?id=7

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #4

P: n/a
Hello,

"Cor" <no*@non.com> schrieb:
i want to put button on windows application to shut down
the pc from dot net framework not to use api's

[Joke]

LOL

I always love the questions asking to do something without PInvoke...

;-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5

P: n/a
Cor
I see I did not type some words in this sentence

And die when the computer is shut down.

And the frameworks dies when the computer is shut down.
Sorry,
Cor
Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.