changing font size on run-time
Started by
yusufozkay
, Jun 30 2005 06:19 AM
#1
Posted 30 June 2005 - 06:19 AM
#2
Posted 04 July 2005 - 04:16 PM
......
in C# newer forget that whenever you use "new" keyword that time you are telling the compiler do this work on the heap, not on the stack...
and second when ever you creat object with "new" keyword that means that object will be known at run time not compile time.
this rule is so important in C# .......
....you have to know this rule by hearth.
and also virtual methods are known at run time too
and there is your solution simply.
//create new windows form in vs and insert the codes in and run it .
static void Main() //this is inserted automaticly by vs.net designer
{
Application.Run(new Form1());
}
/*=====================================*/
//you must isert this variable and function ...
Brush b;
protected override void OnPaint(PaintEventArgs e)
{
Graphics g=e.Graphics;
b=new SolidBrush(Color.Red);
Font f=new Font("Times New Roman",30);
g.DrawString("BuRnEr",f,b,1,25); }
if you dont understand anypoint here just highlight thi word that you did not understand and press F1 key msn help window come up.
and if you want to se how it is work just press F10, for more detail F11...
i hope it will help you
take care
in C# newer forget that whenever you use "new" keyword that time you are telling the compiler do this work on the heap, not on the stack...
and second when ever you creat object with "new" keyword that means that object will be known at run time not compile time.
this rule is so important in C# .......
....you have to know this rule by hearth.
and also virtual methods are known at run time too
and there is your solution simply.
//create new windows form in vs and insert the codes in and run it .
static void Main() //this is inserted automaticly by vs.net designer
{
Application.Run(new Form1());
}
/*=====================================*/
//you must isert this variable and function ...
Brush b;
protected override void OnPaint(PaintEventArgs e)
{
Graphics g=e.Graphics;
b=new SolidBrush(Color.Red);
Font f=new Font("Times New Roman",30);
g.DrawString("BuRnEr",f,b,1,25); }
if you dont understand anypoint here just highlight thi word that you did not understand and press F1 key msn help window come up.
and if you want to se how it is work just press F10, for more detail F11...
i hope it will help you
take care
#3
Posted 05 July 2005 - 01:18 AM
Thanks!
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users