日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > C# >内容正文

C#

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

發布時間:2025/5/22 C# 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 个人代码库の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#千千静听 - 桌面歌词 (功能模拟)的全部內容,希望文章能夠幫你解決所遇到的問題。

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