¿Puedo ejecutar un programa como fondo de pantalla de Win10? (Similar a los fondos de pantalla animados de Android)

¿Puedo ejecutar un programa como fondo de pantalla de Win10? (Similar a los fondos de pantalla animados de Android)

¿Hay alguna forma de ejecutar un programa como fondo de pantalla? Simplemente ejecute un archivo ejecutable de forma persistente en segundo plano. Básicamente sería mi propia "aplicación de fondo de pantalla".

Respuesta1

No, esto no es posible. En Vista Microsoft creóEscena de ensueñoque era solo un video que se reproducía debajo del escritorio. Esto se eliminó en Windows 7 y Microsoft nunca volvió a agregar algo como esto.

Ahora existe una herramienta de terceros llamadaFondo de pantalla animado que afirma que puede ejecutar aplicaciones/juegos como fondo

Respuesta2

Sí, dependiendo del EXE y de sus habilidades, es posible ejecutar una aplicación como fondo de escritorio.

  1. La mejor opción es escribir un programa o script que cree el tipo correcto de ventana. Esto no es fácil, pero es posible. Hay scripts de Python que demuestran cómo hacer esto en sólo unos pocos cientos de líneas de código. Esto ofrece la mayor flexibilidad y eficiencia y el menor costo.

  2. Existe un programa gratuito de código abierto llamado Lively que facilita agregar la mayoría de las cosas (imagen, video, página web, juego/aplicación Unity Engine, etc.) como fondo de escritorio. Sus funciones no son tan amplias como las de algunos programas pagos y no es tan eficiente.

  3. Existe un programa económico ($4-$5 USD) llamado Wallpaper Engine que ofrece más funciones y mejor rendimiento que Lively.

También existen otros programas de fondos de pantalla pagos. Deberá experimentar con cada opción para descubrir cuál se adapta a sus propósitos particulares.

Respuesta3

Si desea una forma sencilla de lograr control total y tener máxima flexibilidad con un EXE como fondo de pantalla, entonces tendrá que crear el programa usted mismo, configurarlo para que se ejecute al inicio y asegurarse de que no consuma recursos.

en resumen, podrías usar el motor de fondos de pantalla. pero no lo recomendaría si no quieres gastar 5 dólares y puedes programar.

Si elige programar desde cero, le recomendaría usar C y la biblioteca <windows.h> y cualquier otra cosa que necesite. windows.h ofrece una gran cantidad de funciones y tipos para usar para crear una VENTANA y controlarla, y para administrar E/S en un nivel mucho más bajo. Por ejemplo:

    #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "v/Vec.h"
#include <windows.h>


#define PI 3.14159265358979323846
#define SECONDS_ANGLE  PI/60*2
#define MINUTES_ANGLE  PI/60/60*2
#define HOURS_ANGLE  PI/60/60/12*2
#define SECONDS_HAND_LENGTH 135*3
#define MINUTES_HAND_LENGTH 140*3
#define HOURS_HAND_LENGTH 90*3
#define PIXEL_RATIO_X 2.0
#define PIXEL_RATIO_Y 5.0
#define nScreenWidth  (1920.0)/PIXEL_RATIO_X        // Console Screen Size X (columns)
#define nScreenHeight (1080.0)/PIXEL_RATIO_Y        // Console Screen Size Y (rows)

typedef struct Circle{
    Vector center;
    float radius;
} Circle,*PCircle;

void scrprint(wchar_t* scrn, Vector center, Vector b, char L){
    //Vector a = VaddR(c,VratioScale(b,(Vector){1,1}));
    Vector a = VaddR(center,b);
    scrn[(int)((int)a.y*nScreenWidth + a.x)] = L;
}

void mlerp (wchar_t* scrn, Vector c, Vector b, double count,char L){
    double inc = 1/count;
    
    for (double i = 0; i <1 ; i+=inc)
    {
        scrprint(scrn, c, VscaleR(b,i), L);
    }
    
}

void DrawCircle(wchar_t* scrn, Circle C, double definition){
    Vector pointer = {0, -1,1};
    double angle = 2*PI/definition;
    for (double i = 0; i<2*PI; i+=angle){
        scrprint(scrn,C.center,VratioScale(VscaleR(pointer,C.radius),(Vector){1/PIXEL_RATIO_X,1/PIXEL_RATIO_Y}),'0');
        Vrotate(&pointer,angle);
    }
}

// #define _WIN32_WINNT 0x0601
// #include<windows.h>
// typedef struct _CONSOLE_FONT_INFOEX
// {
//     ULONG cbSize;
//     DWORD nFont;
//     COORD dwFontSize;
//     UINT  FontFamily;
//     UINT  FontWeight;
//     WCHAR FaceName[LF_FACESIZE];
// }CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
// //the function declaration begins
// #ifdef __cplusplus
// extern "C" {
// #endif
// BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX
// lpConsoleCurrentFontEx);
// #ifdef __cplusplus
// }
// #endif

int main(){
    
    //*set up font size , screen and allocation of buffer
    
    CONSOLE_FONT_INFOEX cfi;
    //WindowFromPoint((POINT){0,0});
    //ShowWindow(GetConsoleWindow(), SW_MAXIMIZE);
    
    ShowCursor(SW_HIDE);
    
    cfi.nFont = FF_DECORATIVE;
    cfi.FontWeight = 1;
    cfi.FontFamily = FKF_CLICKON;
    cfi.dwFontSize.X = 1;
    cfi.dwFontSize.Y = 1;
    
    PCONSOLE_FONT_INFOEX cfiP = &cfi;
    
    // Create Screen Buffer
    wchar_t *screen = (wchar_t*)malloc(sizeof(wchar_t[(int)(nScreenWidth*nScreenHeight)]));
    
    
    POINT mousexy;
    MOUSEINPUT mI;
    COORD loc;
    //*/

    //*handle the console screen
    PCOORD throwaway;
    HWND hCosWindow = GetConsoleWindow();
    UINT hConsoleOut = GetConsoleOutputCP();
    HANDLE hSTDCon = GetStdHandle(STD_OUTPUT_HANDLE);
    HANDLE hConsole = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, 0);
    SetConsoleActiveScreenBuffer(hConsole);
    SetCurrentConsoleFontEx(hCosWindow, 0,cfiP);
    SetConsoleDisplayMode(hCosWindow,SHOW_FULLSCREEN,throwaway);
    
    
    
    DWORD dwBytesWritten = 0;
    //*/

    Vector VminutesHand, VhoursHand, VsecondsHand, VscrCenter,
           VhalfCM, VrescaledHands_S, VrescaledHands_M, VrescaledHands_H;
    //*Vector Init
    VscrCenter.x = (nScreenWidth)/2;
    VscrCenter.y = (nScreenHeight)/2;
    VsecondsHand.y = -SECONDS_HAND_LENGTH;
    VminutesHand.y = -MINUTES_HAND_LENGTH;
    VhoursHand.y = -HOURS_HAND_LENGTH;
    VsecondsHand.x = 0;
    VminutesHand.x = 0;
    VhoursHand.x = 0;
    //*/
    
    clock_t start =clock(), end = clock();
    double timeTaken = 0;
    
    time_t rawtime;
    struct tm * timeinfo;
    
    time(&rawtime);
    timeinfo = localtime(&rawtime);
    
    //angle between 12o'clock and current time
    Vrotate(&VsecondsHand,(2*(double)timeinfo->tm_sec*PI)/60);
    Vrotate(&VminutesHand,(2*((double)timeinfo->tm_min+(double)timeinfo->tm_sec/60)*PI)/60);
    Vrotate(&VhoursHand,(2*((double)timeinfo->tm_hour+((double)timeinfo->tm_min/60+(double)timeinfo->tm_sec/60/60))*PI)/12);

    Circle ClockCirc     = {VscrCenter, 150*3};
    Circle Clock12thDots = {VscrCenter, 120*3};
    Circle Clock60thDots = {VscrCenter, 140*3};

    while(GetAsyncKeyState('Q')==0 || GetAsyncKeyState(VK_LCONTROL)==0 || GetAsyncKeyState(VK_LMENU)==0){
        start = clock();
        //clear screen
        for (size_t i = 0; i < nScreenWidth*nScreenHeight; i++)
        {   
            screen[i] = ' ';           
        }
        
        DrawCircle(screen,ClockCirc,800);
        DrawCircle(screen,Clock12thDots,12);
        DrawCircle(screen,Clock60thDots,60);

        Vrotate(&VsecondsHand, -SECONDS_ANGLE * timeTaken);
        Vrotate(&VminutesHand, -MINUTES_ANGLE * timeTaken);
        Vrotate(&VhoursHand, -HOURS_ANGLE * timeTaken);       
        
        //GetCursorPos(&mousexy);
        //loc.X = (mousexy.x)/2;
        //loc.Y = (mousexy.y)/5;
        //VhalfCM = VaddR(VscrCenter,VratioScale(VsubR((Vector){loc.X, loc.Y},VscrCenter),(Vector){0.5,0.5}));
        //screen[(int)(loc.Y*(nScreenWidth) + loc.X)] = '0';
        //screen[(int)(((int)VhalfCM.y)*nScreenWidth  + (VhalfCM.x))] = '0';
        //screen[(int)((VhalfCM.y) * (nScreenWidth) + (VhalfCM.x))] = '0';
        //always 1half shifted towards vscrncenter but it is smooth 
        //screen[(int)((VscrCenter.y+loc.Y-VscrCenter.y/2)*(nScreenWidth) + VscrCenter.x+(loc.X-VscrCenter.x/2))] = '0';

        screen[(int)(VscrCenter.y*(nScreenWidth) + VscrCenter.x)] = '0';
        
        VrescaledHands_S = VratioScale(VsecondsHand,(Vector){0.5,0.2});
        VrescaledHands_M = VratioScale(VminutesHand,(Vector){0.5,0.2});
        VrescaledHands_H = VratioScale(VhoursHand,(Vector){0.5,0.2});
        
        //mlerp(screen, VscrCenter, VsubR((Vector){loc.X,loc.Y}, VscrCenter),20,'q');
        mlerp(screen,VscrCenter,VrescaledHands_S,60,'.');
        mlerp(screen,VscrCenter,VrescaledHands_M,100,'m');
        mlerp(screen,VscrCenter,VrescaledHands_H,150,'H');
        /*mouse cursor handler
        SetConsoleCursorPosition(hConsole, loc);
        //screen[(int)(loc.Y*(nScreenWidth) + loc.X)] = '0';
        //printf("\033[%d;%dH",mousexy.x, mousexy.y);
        //*/
        
        if (-0.01<VangleR(VsecondsHand,(Vector){0,-1}) && VangleR(VsecondsHand,(Vector){0,-1})<0.01){
            //MessageBeep(MB_ICONWARNING);
        }

        //diagnostics and writeout
        //swprintf_s(screen, 60, L"X= %d, Y= %d, halfCM.x= %.2f, halfCM.y= %.2f", loc.X, loc.Y, VhalfCM.x, VhalfCM.y*nScreenWidth);
        WriteConsoleOutputCharacterW(hConsole, screen, nScreenWidth * nScreenHeight, (COORD){0,0} , &dwBytesWritten);
        timeTaken = ((double) (end - start)) / CLOCKS_PER_SEC;
        end = start;
    }
    free(screen);
    
    
    return 0;
}

Ese es un programa simple que hice para hacer un reloj en la consola. para que funcione, debes configurar la fuente de la consola en 5; Vaya a las propiedades de la consola con un clic derecho en la ventana y luego presione F11 para ver la pantalla completa. los comentarios son para solucionar problemas y realizar pruebas; Puedes deshacerte de ellos, pero si eres nuevo en la programación de Windows, es bueno tener una idea del esquema de nombres con ellos y, si deseas obtener más documentación:https://learn.microsoft.com/en-us/windows/win32/learnwin32/what-is-a-window-


para mi "Vec.h", es solo una biblioteca de vectores normal:

    #ifndef VEC_H
#define VEC_H

#include <math.h>
typedef struct Vector{
    double x,y,m;

} Vector, *PVector;

void VSetEqual (PVector v1,Vector v2){
    v1->x = v2.x;
    v1->y = v2.y;
    v1->m = v2.m;
}

void Vadd (PVector v1,Vector v2){
    v1->x += v2.x;
    v1->y += v2.y;
    
}

void Vsub (PVector v1,Vector v2){
    v1->x -= v2.x;
    v1->y -= v2.y;
}

void Vscale (PVector v1, double s1){
    v1->x*=s1;
    v1->y*=s1;
    v1->m*=s1;
}

Vector VaddR (Vector v1,Vector v2){
    return (Vector){v1.x + v2.x, v1.y + v2.y};
    
}

Vector VsubR (Vector v1,Vector v2){
    return (Vector){v1.x - v2.x, v1.y - v2.y};
}

Vector VscaleR (Vector v1, double s1){
    return (Vector){v1.x * s1, v1.y * s1};
}

double Vdot(Vector A, Vector B){
    return (A.x* B.x + A.y * B.y);
}

double VmagR(Vector v1){
    return sqrt(v1.x*v1.x + v1.y*v1.y);;
}

void Vmag(PVector v1){
    v1->m =  sqrt(v1->x*v1->x + v1->y*v1->y);
}

void Vnorm(PVector v1) {
    Vmag(v1);
    if(v1->m==0) return;
    v1->x /= v1->m;
    v1->y /= v1->m;
    v1->m = 1;
}

Vector VnormR(Vector v1){
    double m = VmagR(v1);
    if (m==0)return (Vector){0,0,0};
    
    return VscaleR(v1,m);
}

Vector VratioScale(Vector v1,Vector scalars){
    v1.x *= scalars.x;
    v1.y *= scalars.y;
    return v1;
}

void Vrotate (PVector v1, double angle){
    double temp = v1->x;
    v1->x = v1->x*cosf(angle) - v1->y*sinf(angle);
    v1->y = temp*sinf(angle) + v1->y*cosf(angle);

}
Vector VrotateR (Vector v1, double angle){
    double temp = v1.x;
    v1.x = (v1.x * cos(angle)) - (v1.y * sin(angle));
    v1.y = (temp * sin(angle)) + (v1.y * cos(angle));
    return v1;
}

double VangleR(Vector v1, Vector v2){
    return (acos((v1.x*v2.x+v1.y+v2.y)/(VmagR(v1)*VmagR(v2))));
}

//cos -sin |  x
//         |
//sin cos  |  y

#endif

información relacionada