Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
QuestionSQl Pin
r.kh2-Mar-09 18:41
r.kh2-Mar-09 18:41 
AnswerRe: SQl Pin
Naveed7272-Mar-09 18:43
Naveed7272-Mar-09 18:43 
QuestionMy Regular expression stop at $ sign Pin
Naveed7272-Mar-09 18:34
Naveed7272-Mar-09 18:34 
AnswerRe: My Regular expression stop at $ sign Pin
PIEBALDconsult2-Mar-09 18:45
mvePIEBALDconsult2-Mar-09 18:45 
GeneralRe: My Regular expression stop at $ sign Pin
Naveed7272-Mar-09 18:48
Naveed7272-Mar-09 18:48 
GeneralRe: My Regular expression stop at $ sign Pin
PIEBALDconsult2-Mar-09 18:51
mvePIEBALDconsult2-Mar-09 18:51 
AnswerRe: My Regular expression stop at $ sign Pin
Shyam K Pananghat2-Mar-09 20:56
Shyam K Pananghat2-Mar-09 20:56 
QuestionRepost : WMI query doesnot return record for user having less previleges!! Pin
Cracked-Down2-Mar-09 18:28
Cracked-Down2-Mar-09 18:28 
QuestionBlocking TCP/IP Client Server Pin
astrovirgin2-Mar-09 17:48
astrovirgin2-Mar-09 17:48 
AnswerRe: Blocking TCP/IP Client Server Pin
Jimmanuel3-Mar-09 3:48
Jimmanuel3-Mar-09 3:48 
AnswerRe: Blocking TCP/IP Client Server Pin
mcldev10-Mar-09 10:57
mcldev10-Mar-09 10:57 
QuestionClient Server Comm Pin
mrithula82-Mar-09 17:45
mrithula82-Mar-09 17:45 
QuestionPathGradientBrush - blending multiple colors in an ellipse shape Pin
Richard Blythe2-Mar-09 17:15
Richard Blythe2-Mar-09 17:15 
AnswerRe: PathGradientBrush - blending multiple colors in an ellipse shape Pin
Xmen Real 2-Mar-09 20:23
professional Xmen Real 2-Mar-09 20:23 
GeneralRe: PathGradientBrush - blending multiple colors in an ellipse shape Pin
Richard Blythe3-Mar-09 5:00
Richard Blythe3-Mar-09 5:00 
GeneralRe: PathGradientBrush - blending multiple colors in an ellipse shape Pin
Xmen Real 3-Mar-09 5:04
professional Xmen Real 3-Mar-09 5:04 
GeneralRe: PathGradientBrush - blending multiple colors in an ellipse shape Pin
Richard Blythe3-Mar-09 5:15
Richard Blythe3-Mar-09 5:15 
Questionserver Pin
mrithula82-Mar-09 17:08
mrithula82-Mar-09 17:08 
AnswerRe: server Pin
JoseMenendez2-Mar-09 17:13
JoseMenendez2-Mar-09 17:13 
QuestionClient-Server Pin
mrithula82-Mar-09 17:07
mrithula82-Mar-09 17:07 
QuestionFiniding the name of Opened windows which is on task bar Pin
Lijo Rajan2-Mar-09 16:50
Lijo Rajan2-Mar-09 16:50 
AnswerRe: Finiding the name of Opened windows which is on task bar Pin
ABitSmart2-Mar-09 17:13
ABitSmart2-Mar-09 17:13 
GeneralRe: Finiding the name of Opened windows which is on task bar Pin
Lijo Rajan2-Mar-09 17:24
Lijo Rajan2-Mar-09 17:24 
GeneralRe: Finiding the name of Opened windows which is on task bar Pin
ABitSmart2-Mar-09 17:41
ABitSmart2-Mar-09 17:41 
QuestionCustom Label OnPaint Override Issue Pin
Member 3966782-Mar-09 16:44
Member 3966782-Mar-09 16:44 
Hi everyone,

I have made a very simple custom control based on the label control.

public class CustomLabel : Label
{
	protected override void OnPaint(PaintEventArgs e)
	{
		//base.OnPaint(e);
		SolidBrush sb = new SolidBrush(ForeColor);
		e.Graphics.DrawString(Text, Font, sb, Margin.Left, Margin.Top, StringFormat.GenericTypographic);
	}
}


Now I have made a form which has one 'CustomLabel' and one 'Label' with exactly the same font.
When the form loads they paint in identical sizes.

If I changed the fonts of both controls like this (scale them by 110%)

label1.Font = new Font(label1.Font.FontFamily,label1.Font.Size * 1.1F,label1.Font.Style);
label2.Font = new Font(label2.Font.FontFamily,label2.Font.Size * 1.1F,label2.Font.Style);


then they begin painting differently. Can anyone help me figure out why even though the two labels
have identical font sizes they draw differently?


Matt

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.