日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

个人代码库のC#千千静听 - 桌面歌词 (功能模拟)

發布時間:2025/5/22 67 豆豆
生活随笔 收集整理的這篇文章主要介紹了 个人代码库のC#千千静听 - 桌面歌词 (功能模拟) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
using System.Drawing; using System.Windows.Forms; using System.Drawing.Drawing2D;namespace WindowsFormsApplication2 {public partial class Form1 : Form{public Form1(){InitializeComponent();this.DoubleBuffered = true;//開啟雙緩存,顯示能夠更平滑。this.Size = SystemInformation.WorkingArea.Size;//默認以整個桌面為大小。這樣就可以顯示全部文字!}Point mouse_offset;private void Form_MouseDown(object sender , MouseEventArgs e){mouse_offset = e.Location; //將當前鼠標相對于“窗體”左上角的坐標賦值給mouse_offset}private void Form_MouseMove(object sender , MouseEventArgs e){if ( e.Button == MouseButtons.Left ){Left = Control.MousePosition.X - mouse_offset.X;Top = Control.MousePosition.Y - mouse_offset.Y;}}string strText2Show = "俺是誰囁?";private void Form1_Paint(object sender , PaintEventArgs e){GraphicsPath buttonPath = new GraphicsPath();System.Drawing.Rectangle newRectangle = this.ClientRectangle;string stringText = strText2Show;//要顯示的字符串。FontFamily family = new FontFamily("Arial");//修改字體。int fontStyle = (int)FontStyle.Regular;//字體字形,eg:加粗或傾斜?int emSize = 72;//字體大小Point origin = new Point(0 , 700-72);//顯示的位置。StringFormat format = StringFormat.GenericDefault;//文本布局信息// 使用“字符串”顯示。buttonPath.AddString(stringText ,family ,fontStyle ,emSize ,origin ,format);this.Region = new System.Drawing.Region(buttonPath);this.BackColor = Color.Red;}private void Form1_Click(object sender , System.EventArgs e){strText2Show = "這是變化后的文本!";this.Refresh();}} }

轉載于:https://www.cnblogs.com/AsionTang/archive/2010/11/20/1885703.html

總結

以上是生活随笔為你收集整理的个人代码库のC#千千静听 - 桌面歌词 (功能模拟)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。