Hi guys, im using DrawString to write some text over a game's screen. The problem is because im having to run it on a timer, realtime (to keep the text on the game screen or will will dissapear) its causing the written text to flicker. iv done some googling about something for forms called backbuffer, but iv enabled that for my forms but it seems to be only for Forms. Also one of my text boxes gets updated and that flickers too.
Wondering if someone knows a simple solution. Maybe a way to freeze the text on the screen and only change it when the value updates?
Thanks
Here's my Drawstring code
Wondering if someone knows a simple solution. Maybe a way to freeze the text on the screen and only change it when the value updates?
Thanks
Here's my Drawstring code
Code:
private void timer2_Tick(object sender, EventArgs e) { string kills = txtBoxkills.Text IntPtr hWnd = WinApi.FindWindowA("WindowName", null); IntPtr hDC = WinApi.GetDC(hWnd); Graphics memDC = Graphics.FromHdc(hDC); memDC.DrawString(kills, new Font("Arial", 15, FontStyle.Bold), Brushes.Blue, new PointF(10, 100)); WinApi.ReleaseDC(hWnd, hDC); }
Comment