Hi, Im trying to display a text message inside a game, it works but it flickers real bad. Programs like FRAPS or XFIRE also draw inside a game but then without the flickering. Whats the best way to make this kind function without the text flickering all the time? The one that Im using now (which flickers) is this one:
Thanks.Code:Public Function DrawText(hwnd As Long, strText As String, x As Long, y As Long) Dim hDC As Long hDC = GetDC(hwnd) If hDC = 0 Then Exit Function SetBkMode hDC, vbTransparent 'Transparent background SetTextColor hDC, 0 'Textcolor to black TextOut hDC, x + 1, y + 1, strText, Len(strText) 'Make shadow TextOut hDC, x + 2, y + 2, strText, Len(strText) 'Make shadow SetTextColor hDC, RGB(0, 255, 0) 'Set text color to green TextOut hDC, x, y, strText, Len(strText) 'Write the text UpdateWindow hwnd ReleaseDC hwnd, hDC End Function




Reply With Quote