| |
|
| |
How to Draw Text Over an ImageThe .NET label control doesn't support transparent backgrounds. You have to use drawing primitives.IMPORTANT NOTE: You have to use the graphics object for the image not the form. Otherwise your text may appear 'under' the image.
protected override void OnPaint(PaintEventArgs args)
{
// Assumes a picture box that you're drawing over
Graphics graphics = Graphics.FromImage(pictureBox.Image);
graphics.DrawString(text, font, brush, x, y);
}
| |
|
All content copyright 1996-2008 by Linda Naughton O'Meara unless otherwise noted.
Shadowrun is a copyright and trademark of WizKids, LLC.
Earthdawn is a copyright and trademark of FASA Corporation.
Crimson Skies is a copyright and trademark of Microsoft Corporation.
Babylon 5 is a copyright and trademark of Time Warner Entertainment.
Battlestar Galactica is a copyright of Sci Fi / Universal.
Any use of characters, names, places, etc. from these systems is done with the greatest respect for their creators, and is not intended as a challenge to any copyrights or trademarks.
| |