Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27234

VS 2010 [RESOLVED] Draw String

$
0
0
I have a transparent form and am displaying text via the Paint Sub on a Timer.

Here is my code:

Code:

    Private Sub TextForm_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles TextForm.Paint
        e.Graphics.DrawString("Test string", New Font(Me.Font.FontFamily, 25, FontStyle.Regular), Brushes.Red, xCoord, yCoord)
    End Sub

This works well. However, if another application has the focus (other than my own form), the string is not visible when the Paint Sub is called.

How can I get the sting to be drawn 'On Top' of all open windows?

Viewing all articles
Browse latest Browse all 27234

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>