Dynamic text printed on the desktop using Delphi?

2020-08-05 10:11发布

I have seen on our cloud servers, there is some text printed on the desktop dynamically, showing how much memory is available, hard drive space, etc. This is not like a window or gadget or anything, but somehow it's painted directly on the desktop. How can I accomplish this? I've seen only text, but it would be nice if I can draw graphics on the desktop as well.

Here's a sample of what I mean: Sample of drawing text on the desktop


EDIT:

Due to someone's misunderstanding of what I was asking, allow me to clarify:

I do not necessarily need to do exactly what this existing tool does. In fact, I am not wanting to print system information at all. I want to print my own information to look the same way, but it does not matter what approach I use to accomplish this (whether using a window, saving a desktop image, drawing to the desktop's canvas, any of those are possible answers). I only want to make something to have a similar end result.

2条回答
乱世女痞
2楼-- · 2020-08-05 10:24

There's a very good chance it's not actually painted dynamically, but is instead using something like BGInfo:

http://technet.microsoft.com/en-us/sysinternals/bb897557

This is a utility that runs at startup (and can be set to re-run periodically), and creates an image that's then used as the desktop background.

查看更多
The star\"
3楼-- · 2020-08-05 10:30

You could have a look here and draw directly on the desktop using the built-in TCanvas type. It's probably less optimal than using a transparent window, but I think it's worth looking at. I just tested it and it works well under Windows 7.

查看更多
登录 后发表回答