0

To give an example of what I mean, external FPS counters, that overlay the entire screen or overlay a certain window, it allows for users to click through it, stays visible, and doesn't have a main form window that's visible.

Now using visual studio 2019, in visual basic, I can temporarily replicate exactly what I'm looking for with this;

Dim thingy As Graphics = Graphics.FromHwnd(New IntPtr(0))
thingy.DrawString("Hello World!", New Font(Me.Font.FontFamily, 25, FontStyle.Regular), Brushes.White, 50, 50)

This creates a text in the top left of my screen. However, it does not stay visible forever, it goes just as it comes. I tried putting it in a loop, but then it was flashy. So then I tried OnPaint override, but it only recreated the text after I hovered my mouse over a button in the main form of the project, then went away.

My goal is to create a text via GDI (Open to suggestions, assuming gdi is impossible for this), in the top left of my screen. The text will have the capabilities to be updated/modified at any time, and will not go away until either the process is killed, or I delete/clear/hide the text, all coded in visual basic.

  • 1
    You need a DirectX overlay. See whether this helps: [GameOverlay.Net - GitHub](https://github.com/michel-pi/GameOverlay.Net). A Per-Pixel Alpha layered Form (as shown [here](https://stackoverflow.com/a/60688580/7444103), adding `WS_EX_TRANSPARENT` to the Styles in `CreateParams`) could also do (you have to draw to a Bitmap), but it's not as efficient as the DirectX counterpart. – Jimi Sep 14 '20 at 20:09
  • This helps, thank you very very much. – user6471847 Sep 14 '20 at 23:58

0 Answers0