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

windows Key + R and Windows Key + L

P: n/a
i'd like to know that what execution file is for windows key + R and windows
Key + L

is it exsiting file on windows xp??

if so, where can i find this? tell me about this file name and folder path??


May 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello PointMan,

WK+R calls "Run" dialog box and WK+L block the station.
It's not the pure apps that you are looking for, it's just calls to the windows
system libs

P> i'd like to know that what execution file is for windows key + R and
P> windows Key + L
P>
P> is it exsiting file on windows xp??
P>
P> if so, where can i find this? tell me about this file name and folder
P> path??
P>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
May 13 '06 #2

P: n/a
thank you michael
if so, i also wanna know what is library fuction in c#??
how can i invoke this hot key?

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:9c**************************@msnews.microsoft .com...
Hello PointMan,

WK+R calls "Run" dialog box and WK+L block the station.
It's not the pure apps that you are looking for, it's just calls to the
windows system libs

P> i'd like to know that what execution file is for windows key + R and
P> windows Key + L
P> P> is it exsiting file on windows xp??
P> P> if so, where can i find this? tell me about this file name and
folder
P> path??
P> ---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche

May 13 '06 #3

P: n/a
PointMan,
i'd like to know that what execution file is for windows key + R and
windows Key + L


When you press Win+R, the Windows Shell Run dialog box is shown. And, when
you press Win+L, the workstation is locked.

It might be possible to execute these two commands using RunDll32 (see for
example http://www.mediachance.com/faqdll.htm how to lock the workstation),
but since this method is largely undocumented, you are better of calling the
correct APIs directly.

First, to display the Windows Run dialog box, do this:

1. Start a WinForms project in Visual Studio, and add a reference to
SHELL32.DLL to your project (this DLL is in the \Windows\System32
directory).

2. Add "using Shell32;" to your C# file.

3. Type in the following code:

Shell32.ShellClass shell = new ShellClass();
Shell32.IShellDispatch disp = (IShellDispatch)shell;
disp.FileRun();

Secondly, to lock the workstation, do this:

using System.Runtime.InteropServices;
...
[DllImport("user32.dll")]
public static extern void LockWorkStation();

private void button5_Click(object sender, EventArgs e)
{
LockWorkStation();
}

That's it. Have a nice weekend!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
May 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.