字体对齐.txt

来自「C#知识库是在学习C#时积累的一些知识。本软件用C#编写,运行需要Microso」· 文本 代码 · 共 8 行

TXT
8
字号
Font aFont=new Font("Arial",16,FontStyle.Bold|FontStyle.Italic);//字体的样式
			rect=new Rectangle(0,y,400,aFont.Height);
			g.DrawRectangle(Pens.Blue,rect);
			StringFormat sf=new StringFormat();//对齐
			sf.Alignment=StringAlignment.Far;
			g.DrawString("This text is right justified.",aFont,Brushes.Blue,rect,sf);
			y+=aFont.Height+20;
			aFont.Dispose();

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?