windows Key + R and Windows Key + L

  • Thread starter Thread starter PointMan
  • Start date Start date
P

PointMan

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??
 
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
 
thank you michael
if so, i also wanna know what is library fuction in c#??
how can i invoke this hot key?
 
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
(e-mail address removed)
http://www.saunalahti.fi/janij/
 

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

Back
Top