Capture screenshot Including Semitransparent windows in .NET

Forms that have the TransparencyKey or Opacity property set are so-called layered windows. They are shown using the “overlay” feature of the video adapter. Which make them being able to have their transparency effects. Capturing them requires turning on the CopyPixelOperation.CaptureBlt option in the CopyFromScreen overload that accepts the CopyPixelOperation argument. Unfortunately, this overload has … Read more

Vim: Change start up directory?

Assuming you’re starting gvim from an icon/shortcut in Windows (from the kind of paths you supply), you can change the starting directory (completely independent from the fact that it IS gvim: it would be the same from any other app!) by editing the “starting directory” property of that Windows icon/shortcut.

Difference between OPEN_ALWAYS and CREATE_ALWAYS in CreateFile() of Windows API

CREATE_ALWAYS also truncates the contents if the file already exists. On the other hand, OPEN_ALWAYS will not clobber an already existing file. Here’s how the different values work in tabular form: | When the file… This argument: | Exists Does not exist ————————-+—————————————————— CREATE_ALWAYS | Truncates Creates CREATE_NEW +———–+ Fails Creates OPEN_ALWAYS ===| does this … Read more

Windows Visual Themes: Gallery of Parts and States?

I have created a small Windows application, programmed with the table at Parts and States. This application lets the programmer browse and explore all parts and states, using the current OS theme. (High-Res) It can be downloaded at https://privat.rejbrand.se/UxExplore.exe The (Delphi, Win32 API) source, which is too long to be posted here (due to hundreds … Read more