- May
- 13,590
- 201
With Win7's new GUI, it's not easy to get to the (good old) "Run" dialog without a Win key (and I don't have a Win key). I first wrote a little app to simulate Win+R (that'll do it) and assigned it to a hotkey ... only to realize that that strategy will never work because my hotkey combination is depressed when Win+R is simulated. And a delay would not be acceptable.
Then Google helped me find this tidbit.
That'll do it. But it leaves me with a question (and hoping for some speculation). When that's done repeatedly, each Run dialog is a bit lower and to the right than the previous one (whether or not the previous one has been dismissed) ... common behavior in Windows. But when I do the same thing (I suppose) with code like that below, the Dialog opens at (0,0) every time. Would anyone care to speculate on the difference? From what I could Google, none of parameters of SHELL32.DLL/Ordinal#61 have anything to do with position.
Then Google helped me find this tidbit.
Code:
rundll32.exe shell32.dll,#61
That'll do it. But it leaves me with a question (and hoping for some speculation). When that's done repeatedly, each Run dialog is a bit lower and to the right than the previous one (whether or not the previous one has been dismissed) ... common behavior in Windows. But when I do the same thing (I suppose) with code like that below, the Dialog opens at (0,0) every time. Would anyone care to speculate on the difference? From what I could Google, none of parameters of SHELL32.DLL/Ordinal#61 have anything to do with position.
Code:
typedef INT (WINAPI *RUN_DIALOG_TYPE)(HWND, HICON, LPWSTR, LPWSTR, LPWSTR, INT);
HMODULE hShell32 = LoadLibrary(L"SHELL32.DLL");
RUN_DIALOG_TYPE RunDialog = (RUN_DIALOG_TYPE) GetProcAddress(hShell32, (LPCSTR) 61);
RunDialog(NULL, NULL, NULL, NULL, NULL, 0);