Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 20:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C#] GDI+ Text Schatten

Discussion on [C#] GDI+ Text Schatten within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 25
Join Date: Sep 2011
Posts: 5,536
Received Thanks: 1,266
[C#] GDI+ Text Schatten

Hey Leute,

Hab grade ein Problem!
Und zwar will ich per GDI einen Schatten zu einem Text hinzufügen.

Bisheriger Source:


Als Text:
Code:
private void frmMain_Paint(object sender, PaintEventArgs e)
        {
            string title = this.Text;
            FontFamily fontFamily = new FontFamily("Arial");
            Font font = new Font(fontFamily,12,FontStyle.Bold,GraphicsUnit.Pixel);

            e.Graphics.DrawString(title, font, Brushes.Gray, new Point(20, 11));
        }
Zu dem Text will ich jetzt einen Schatten hinzufügen.

Lg. Padrio
IchVerabschiedeMich is offline  
Old 10/18/2012, 03:20   #2



 
Shawak's Avatar
 
elite*gold: 0
The Black Market: 259/0/0
Join Date: Apr 2010
Posts: 10,289
Received Thanks: 3,613
Mach's doch einfach so:
Code:
private void frmMain_Paint(object sender, PaintEventArgs e)
        {
            string title = this.Text;
            FontFamily fontFamily = new FontFamily("Arial");
            Font font = new Font(fontFamily,12,FontStyle.Bold,GraphicsUnit.Pixel);

            e.Graphics.DrawString(title, font, Brushes.LightGray, new Point(21, 12));
            e.Graphics.DrawString(title, font, Brushes.Gray, new Point(20, 11));
        }
Shawak is offline  
Old 10/19/2012, 06:26   #3
 
elite*gold: 25
Join Date: Sep 2011
Posts: 5,536
Received Thanks: 1,266
Es geht mir eher um einen Schlagschatten wie in Photoshop.
Bspw. wie ich meine beiden Addys in meiner Signatur hab.



Es gibt eine Variante für Framework 4.5 aber nur dafür das fw von 2.0 auf 4.5 zu Schrauben währe Schwachsinn.

Edit://
Ich dachte mir vllt nen Bild hinter zu Legen, aber irgendwie Schwachsinnig oder nicht?
IchVerabschiedeMich is offline  
Old 10/19/2012, 10:48   #4
 
kissein's Avatar
 
elite*gold: 0
Join Date: Sep 2005
Posts: 427
Received Thanks: 87
Hab in der Quellcodeverwaltung noch ein Snippet gefunden, was aber schon von 2006 ist.
Evtl. hilft es dir ja weiter,

kissein is offline  
Old 10/21/2012, 00:30   #5

 
x]vIrus[x's Avatar
 
elite*gold: 37
Join Date: Apr 2004
Posts: 2,154
Received Thanks: 250
hi, so gehts:


wie im quelltext gezeigt, ganz einfach den text in nen neues bitmap zeichnen, dieses dann blurren und letztendlich dann in das andere graphics objekt zeichnen, das ist das einfachste, was mir im moment einfällt.
x]vIrus[x is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Signature/Avatar/Intro Text/Glow Text [FREE]!
10/19/2012 - Freebies - 121 Replies
Welcome To http://i.epvpimg.com/TrzGe.png http://i.epvpimg.com/GpRwh.gif RULES Post what image you like on a spoiler. What text Animations... ? etc? Details :
Sig/Avatar/Intro Text/GlowText/Cool Glow Text.
09/28/2012 - elite*gold Trading - 2 Replies
Moved Here Free from now.
[C#] abfragen, ob textbox.text = teil von label.text
01/28/2012 - .NET Languages - 7 Replies
Guten Abend, ich benötige eure Hilfe. Ich möchte, dass das Programm abfrägt, ob textbox.text = teil von label.text z.B. label.Text = "1234" textbox.Text = "23" if (label.Text == textbox.Text) {...} wie kann ich ihn auslesen lassen, ob nur ein bestimmter teil des labels den text der textbox enthält?



All times are GMT +1. The time now is 20:10.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.