Text overlay on another window - HUD

I am interested in writing an application that overlays a small screen up ( HUD ) on another application in VB.NET, What is an example of this?

I will need to list all open windows to find the desired window, and then overlay some text at a specific position in the window. If the user moves this window, I need text. (I will probably draw the text in a loop again and again).

Edit: No one answered my initial request. I added C # to the keywords to find out if any of the gurus in this language can get an answer.

+3
source share
1 answer

WinApi . googling

[DllImport("user32.dll")]
public static extern int EnumWindows(EnumWindowsProc ewp, int lParam);

[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetWindowRect(IntPtr hWnd, ref WapiRect lpRect);

, , -

Graphics g = Graphics.FromHwnd(win.Handle);
g.FillRectangle(new SolidBrush(Color.White), 0, 0, 1000, 1000);

... ( ) . .

+4

Source: https://habr.com/ru/post/1720017/


All Articles