sábado, 20 de agosto de 2016

Aligerando el entorno de desarrollo de Visual Studio 2015 Community


image

Seguramente al instalar Visual Studio 2015 Community lo tendrá configurado como viene por defecto, pero muchas veces esta configuración incluye características habilitadas que ralentizan el IDE, convirtiendo nuestra tarea de programar en algo tedioso y lento; y aunque quizás requiera de esas características, normalmente para quienes no la necesitan es mejor deshabilitarlas para obtener una respuesta más rápida tanto del depurador como del IDE.

jueves, 30 de junio de 2016

Creating a Yosemite shadow for borderless form in Delphi [part 2]


Now that we have our shadow picture, it is time to create our project, so with no further ado let’s create a new VCL Form application in Delphi, and add another VCL form, that will be our shadow form which will be an alpha layered window, that’s because we will use the main form as the content holder, and VCL controls are not compatible with alpha layered windows, neither can be translucent, so that’s why we need two forms.

For the sake of small footprint of the pictures, I cropped them to 252x252 resulting in the following:

macosxmacosx2

Name the second form as frmShadow and then add those two pictures as resources: Project->Resources and images

Creating a Yosemite shadow for borderless form in Delphi [part 1]


Long time ago I wrote a blog post here, about creating a Metro like application, it was an interesting research process, I’ve learned a lot, but there was left the shadow, since CS_DROPSHADOW was not exactly the shadow that normal windows show.

So today, I’m going to write another method that basically will use another form as a shadow due to alpha layered requirement to draw alpha channel pictures, hence this will be the shadow of our program.

I have decided that this program will use the OSX Yosemite’s shadow, for the sake of the fun.

First step: recreate the original Yosemite shadow alpha mask

This was an easy task (I tried to write a reverse alpha mask finder tool), I just created a rectangle with an specific color, moved a Yosemite window over this rectangle, captured a snapshot to a PNG file, in order to process them (two: active and inactive shadows), so I could find out the original alpha mask, and then convert it to a ARGB PNG file to use in our program as the shadow.

Tools I have used: Imagemagick and a picture editor (Photofiltre in my case).

Captura de pantalla 2016-06-29 a las 2.16.54

This is the picture, using a background picture with the #B100B2 color.

lunes, 20 de junio de 2016

UPoPS–Utilitario para modificar Prince of Persia para pantallas anchas


image

La semana pasada Ubisoft nos obsequió su famoso juego Prince of Persia – The Sands of Time, que se lanzó el 2003, sin embargo muchos de ustedes habrán notado que el juego no se adapta correctamente a pantallas 16:9 (anchas o widescreen), y esto no ha sido corregido por Ubisoft de manera oficial, pero existen modificaciones al archivo binario que permiten modificar la resolución del juego.

martes, 3 de noviembre de 2015

How to enable PPAPI Flash support in DCEF3 branch 2454


DCEF3 branch 2454 now introduces Chromium version 45 which was announced a few hours ago by the author of DCEF Henri Gourvest and it is awesome.

However, I noticed that Flash was not working anymore, so digging in CEF and Chromium forums I found out that Chromium version 45 officially dropped NPAPI support, but it still supports PPAPI, so we need to add --enable-system-flash to our program's executable shortcut (command line params) in order to enable Flash again for our program.

jueves, 23 de julio de 2015

Enable Windows 10 Aero Glass a.k.a Blur Behind in our Delphi project


When Windows 8 arrived, it removed the Aero Glass feature from the operating system, some of us missed that feature and there are also some projects like http://www.glass8.eu/ which allows us to have Aero Glass back.
But now in Windows 10, this feature is back or kinda, because it remains as undocumented and only shown in the new Start Menu and some Immersive Applications like popups (Volume, Notification Center and other few ones).
However, we still need the old Aero Glass API before applying the Blur Behind “patch” in order to make it work again in our application.
Windows-10-Aero-Glass
In Delphi XE+ we just need to enable it using the Form’s GlassFrame property, but if you are using older Delphi versions, you needed to call the DWM API by yourself, something like the following: