-
C# 读取MP3歌曲文件标志信息并使用Quartz库播放
C# 读取MP3歌曲文件标志信息并使用Quartz库播放、读取WAV歌曲文件标志信息、使用Quartz库播放MP3歌曲、使用Quartz库播放DVD视频、弹出光驱、关闭光驱等功能,获取的MP3文件信息包括歌名、艺术家、签名册、发行日期等。同时还可以读取WAV歌曲文件标志信息,具体的标记信息请下载本源码查看Form1.cs文件。本实例部分功能需要依赖Interop.QuartzTypeLib.dll组件来实现。
- 2023-05-14 15:55:02下载
- 积分:1
-
C# 使用字符串数组创建一组单选框数据
C# 基于字符串数组创建一组单选按钮的例子,附上了例子源代码,大家可了解C#字符串数组的简单应用。
以下是例子中的代码,运行后可见如下图所示的图片效果:
//基于字符串数组创建一组单选按钮
string[] MyArray = new string[4];
MyArray[0] = "渝北区";
MyArray[1] = "巴南区";
MyArray[2] = "长寿区";
MyArray[3] = "南岸区";
RadioButton[] MyRadioButtons =new RadioButton[4];
for (int i = 0; i < 4; ++i)
{
MyRadioButtons[i] = new RadioButton();
MyRadioButtons[i].Text = MyArray[i];
MyRadioButtons[i].Location = new System.Drawing.Point(
10, 20 + i * 20);
this.groupBox1.Controls.Add(MyRadioButtons[i]);
}
this.groupBox1.Text = "请评选全市卫生城区:";
- 2022-02-27 00:14:46下载
- 积分:1
-
程序守护(进程守护)-源代码C#
程序守护(进程守护)-源代码C#
/*
* 由SharpDevelop创建。
* 用户: zhang
* 日期: 2017/3/18
* 时间: 21:50
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
namespace CPinfoSafe
{
public sealed class NotificationIcon
{
private NotifyIcon notifyIcon;
private ContextMenu notificationMenu;
DialogResult dr;
#region Initialize icon and menu
public NotificationIcon()
{
notifyIcon = new NotifyIcon();
notificationMenu = new ContextMenu(InitializeMenu());
notifyIcon.DoubleClick += IconDoubleClick;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon));
notifyIcon.Icon = (Icon)resources.Get
- 2022-11-01 19:35:03下载
- 积分:1
-
MFC股票软件源码
MFC股票软件源码,用来分析股票数据。
- 2022-07-06 19:06:18下载
- 积分:1
-
C#编写winForm版的数据库创建数据表程序
C#编写winForm版的数据库创建数据表程序,通过查询语句来创建数据表,用户可在窗口内输入需要创建的数据表名称,点击操作按钮,转入程序执行阶段,将使用SQL语句来生成数据表,窗口运行效果如图所示。
- 2022-03-11 17:55:01下载
- 积分:1
-
C# GroupBy将字符串数组按元素长度分组
C#演示 GroupBy字符串操作范例,C# GroupBy将字符串数组按元素长度分组:
string[] Words = new string[] { "what", "is", "your", "name", "?", "my", "name", "is", "lyf", "." };
var Groups = from word in Words
group word by word.Length into lengthGroups//按单词长度将单词分组
orderby lengthGroups.Key descending//按单词长度降序排列
select new
{
Length = lengthGroups.Key,//取单词长度
WordCollect = lengthGroups//取该长度的单词分组集合
};最后使用foreach循环遍历每组单词,将罗列出包括指定字符的单词是哪几个。
- 2023-08-16 01:45:03下载
- 积分:1
-
C# 查询数据库时不显示重复记录
C# 查询数据库时不显示重复记录,以查询已销售图书信息为例,演示如果略过重复数据,不显示重复的数据记录。
string P_Str_ConnectionStr = string.Format(//创建数据库连接字符串
@"server=WIN-GI7E47AND9RLS;database=db_TomeTwo;uid=sa;pwd=");
string P_Str_SqlStr = string.Format(//创建SQL查询字符串
"SELECT 书号,条形码,书名,作者,出版社 FROM tb_Book");
SqlDataAdapter P_SqlDataAdapter = new SqlDataAdapter(//创建数据适配器
P_Str_SqlStr, P_Str_ConnectionStr);
DataTable P_dt = new DataTable();//创建数据表
P_SqlDataAdapter.Fill(P_dt);//填充数据表
return P_dt;//返回数据表
- 2022-06-11 17:53:03下载
- 积分:1
-
7Zip
This file is part of SevenZipSharp. SevenZipSharp is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SevenZipSharp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SevenZipSharp. If not, see .
- 2022-07-20 00:09:31下载
- 积分:1
-
C# 向StatusBar状态栏控件中添加窗格面板
C# 向StatusBar状态栏控件中添加窗格面板及文字,也就是把窗口的状态栏分栏,分隔成若干个小区域,显示不同的信息,比如文字提示或图标等。
向StatusBar控件添加窗格面板
StatusBar statusBar1=new StatusBar();
statusBar1.Panels.Add("中华人民共和国");
statusBar1.Panels.Add("重庆市");
statusBar1.Panels.Add("罗斌");
statusBar1.Panels[0].AutoSize = StatusBarPanelAutoSize.Contents;
statusBar1.Panels[1].AutoSize = StatusBarPanelAutoSize.Spring;
statusBar1.Panels[2].AutoSize = StatusBarPanelAutoSize.Contents;
statusBar1.Panels[0].BorderStyle =StatusBarPanelBorderStyle.Raised;
statusBar1.Panels[1].BorderStyle = StatusBarPanelBorderStyle.Sunken;
statusBar1.Panels[2].BorderStyle = StatusBarPanelBorderStyle.Raised;
statusBar1.Panels[2].Icon = new System.Drawing.Icon( @"Error.ico");
statusBar1.ShowPanels = true;
this.Controls.Add(statusBar1);
- 2022-05-17 04:53:06下载
- 积分:1
-
C# 禁止鼠标左键单击的实现源码
C# 禁止鼠标左键单击,附上例子源码,禁止后将不响应鼠标左键消息,当然也可恢复鼠标左键,直接关闭本程序即可恢复,实现方法也很简单,看如下代码:
private void button1_Click(object sender, EventArgs e)
{//禁止鼠标左键单击
Application.AddMessageFilter(this);
MessageBox.Show("鼠标左键已经被禁止,请用Tab键执行操作!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void button2_Click(object sender, EventArgs e)
{//允许鼠标左键单击
Application.RemoveMessageFilter(this);
MessageBox.Show("鼠标左键已经被解禁,可以执行操作!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public bool PreFilterMessage(ref System.Windows.Forms.Message MySystemMessage)
{//不响应鼠标左键消息
if (MySystemMessage.Msg >= 513 && MySystemMessage.Msg
- 2022-03-09 09:45:43下载
- 积分:1