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

Under which circumstances does the System process (PID 4) retain an open file handle?

Files accessed through a share will be locked by the system process (PID 4). Try opening compmgmt.msc -> System Tools -> Shared Folders -> Open Files to see if the locked file is listed there See also the sysinternals forum for a way to replicate this. Not all applications lock files when they are opened, … Read more

How can I remove titlebar and taskbar icons of Java programs on Windows 7?

The problem is using EnumDesktopWindows instead of EnumWindows. The following code works fine on my pc: using System; using System.Runtime.InteropServices; namespace IconKiller { class Program { /// Import the needed Windows-API functions: // … for enumerating all running desktop windows [DllImport(“user32.dll”)] static extern bool EnumWindows(EnumDesktopWindowsDelegate lpfn, IntPtr lParam); private delegate bool EnumDesktopWindowsDelegate(IntPtr hWnd, int lParam); … Read more

How can I programmatically manipulate Windows desktop icon locations?

If I’m not mistaken the desktop is just a ListView, and you’ll have to send the LVM_SETITEMPOSITION message to the handle of the desktop. I googled a bit for some c# code and couldn’t find a example, but I did found the following article. Torry: …get/set the positions of desktop icons?. It’s delphi code, but … Read more

How do I force windows NOT to redraw anything in my dialog when the user is resizing my dialog?

You can’t prevent painting during resizing, but you can (with care) prevent repainting which is where flicker comes from. first, the bitblt. There a two ways to stop the bitblt thing. If you own the class of the top level window, then just register it with the CS_HREDRAW | CS_VREDRAW styles. This will cause a … Read more

How do you set the glass blend colour on Windows 10?

Since GDI forms on Delphi don’t support alpha channels (unless using alpha layered windows, which might not be suitable), commonly the black color will be taken as the transparent one, unless the component supports alpha channels. tl;dr Just use your TTransparentCanvas class, .Rectangle(0,0,Width+1,Height+1,222), using the color obtained with DwmGetColorizationColor that you could blend with a … Read more

Can a Windows dll retrieve its own filename?

I think you’re looking for GetModuleFileName. http://www.swissdelphicenter.ch/torry/showcode.php?id=143: { If you are working on a DLL and are interested in the filename of the DLL rather than the filename of the application, then you can use this function: } function GetModuleName: string; var szFileName: array[0..MAX_PATH] of Char; begin FillChar(szFileName, SizeOf(szFileName), #0); GetModuleFileName(hInstance, szFileName, MAX_PATH); Result := … Read more

How to programmatically create a shortcut using Win32

Try Windows Shell Links. This page also contains a C++ example. Descriptive Snippet: Using Shell Links This section contains examples that demonstrate how to create and resolve shortcuts from within a Win32-based application. This section assumes you are familiar with Win32, C++, and OLE COM programming. EDIT: Adding the code sample in case the link … Read more