
.net C#
pwair
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C# 播放mp3
using System.Media; WMPLib.WindowsMediaPlayer Wmp = new WMPLib.WindowsMediaPlayer(); wmp.settings.setMode("loop", true); wmp.URL = PropertyFileOperator.GetWavePath("test.mp3"); wmp.settings.volume = 100; wmp.controls.play(); 需要导入C:/Windows/System32/wm原创 2010-11-23 10:42:00 · 832 阅读 · 0 评论 -
C# 文件夹操作若干
public static bool IsUsed(String fileName) { bool result = false; try { FileStream fs = File.OpenWrite(fileName); fs.Close(); } c原创 2010-11-23 11:04:00 · 809 阅读 · 0 评论 -
C# 窗体不显示最大化等按钮
public void CreateMyBorderlessWindow() { this.FormBorderStyle = FormBorderStyle.None; this.MaximizeBox = false; this.MinimizeBox = false; this.StartPosition = FormStartPosition.CenterScreen; // Remove the control box so the原创 2010-11-23 10:38:00 · 3330 阅读 · 0 评论 -
C# 设置控件的背景图片
this.btnNext.BackgroundImage = System.Drawing.Image.FromFile("图片路径");原创 2010-11-23 11:18:00 · 1537 阅读 · 0 评论 -
C# 无边框按钮,获得焦点时也没有框
无边框设定,在XXX.Designer.cs中: this.btnNext.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnNext.FlatAppearance.BorderSize = 0; this.btnNext.FlatAppearance.CheckedBackColor = System.Drawing.Color.White;原创 2010-11-23 11:25:00 · 7308 阅读 · 4 评论 -
C# 捕获USB插入,拔出事件
public const int WM_DEVICECHANGE = 0x219; public const int DBT_DEVICEARRIVAL = 0x8000; public const int DBT_DEVICEREMOVECOMPLETE = 0x8004; protected override void WndProc(ref Message m) {原创 2010-11-23 10:54:00 · 6608 阅读 · 1 评论 -
C# 设置鼠标位置
[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern int SetCursorPos(int x, int y); public setMousePos() { SetCursorPos(1, 1); }原创 2010-11-23 11:15:00 · 1605 阅读 · 0 评论 -
C# 将自己写的方法添加到系统事件中
<br />在Designer.cs中<br />this.btnNext.Click += new System.EventHandler(this.button1_Click);原创 2010-11-23 11:30:00 · 839 阅读 · 0 评论