Does Visual Studio 2013 launch higher resolution applications than manually using .exe?

I noticed something really strange. If I run the following code from VS2013, it works as expected. However, when I manually double-click the compiled .exe, it is not. This makes me think that VS2013 is somehow launching higher resolution applications.

#include <stdio.h> #include <tchar.h> #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { printf("You have 5 seconds to open a Metro App. \nThen we'll try setting the TaskBar as the foreground window.\n\n"); Sleep(5000); printf("Setting Taskbar as foreground window now... \n"); SetForegroundWindow(FindWindow(L"Shell_TrayWnd", NULL)); getchar(); return 0; } 

When starting from VS2013: even if the Metro application is open (occupies the entire screen), after the taskbar is set as the foreground window, the user returns to the desktop.

Double-clicking .exe: If Metro is the foreground window, nothing happens.

As a side note, I tried right-clicking and "Run as administrator", however this still does not work. This is even more confusing. Does anyone know what is going on here?

In addition, I am running a preview of Windows 8.1.

+4
source share
3 answers

I spoke with people about this Microsoft. This seems to be documentation that is a bit inaccurate. "The foreground process is being debugged." it should be something like "The calling process is being debugged." It will be updated soon.

0
source

No, it launches a debugging application with the same permissions.

However, if you read the manual , you will see that permissions have nothing to do with it. But debugging is explicitly indicated.

0
source

You cannot just double-click an exe for a WinRT application. There is another application launch model that creates a process for exe. This is done using the application / package activation, which the designer also does. So if you are an F5 application, it will work because it uses WinRT activation mechanisms.

0
source

Source: https://habr.com/ru/post/1501137/


All Articles