求C#计算录音时长的方法!!!!!! C# Dsound 计算时长,或是别的控件啥的任何都行,只要能计算时长,只要返回一个值,希望大虾们帮个忙~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 点开始的时候就开始计算咯, 到结束的时候 获取 时间就可以了。向窗体添加一个 Timer控件 输入代码 一个textbox控件 private void timer1_Tick(object sender, EventArgs e) { long curTickValue = Environment.TickCount; long difference = curTickValue - compuTime; long applicationHours, applicationMinutes, applicationSeconds; applicationHours = (difference / (3600 * 999)) % 24; applicationMinutes = (difference / (60 * 999)) % 60; applicationSeconds = (difference / 999) % 60; this.textbox1.Text = "录音时间:" + applicationHours + " 小时 " + applicationMinutes + " 分 " + applicationSeconds + " 秒 "; }点击开始录音输入代码 this.timer1.Interval = 1000; this.timer1.Start();记得结贴 结束是this.timer1.Stop();然后textbox1里的时间就是了。 你好,出现一个错误 error CS0103: The name 'compuTime' does not exist in the current context这是为什么呢?? 别沉了啊,,,谁帮帮忙啊 给个code啊。 我发的代码里有个名字叫 compuTime的吗? 果然有,随便在外面添加句“ long compuTime = 0;” 不好意思,误人子弟了,我这是程序启动时间。 SORRY。 C#高手请进,淘宝API测试程序错误 c#2005打包问题 基础程序编写,急啊!!!!路过看看也好啊 关于IDataReader的问题 在PPC2003中怎样获得一个文件夹下的文件列表? 如何判断一个类是否继承另一个类? WPF 我想创建一自定义控件继承自canvas的 想制作文档折叠,请教,目前分数少,结分时补,谢谢 这里有一小问题要大家帮忙????? 据说C#编的程序.exe可以看到源代码,是这样吗? 一段有问题的C#代码~~请教高人 ASCII文件的操作问题
一个textbox控件 private void timer1_Tick(object sender, EventArgs e)
{
long curTickValue = Environment.TickCount;
long difference = curTickValue - compuTime;
long applicationHours, applicationMinutes, applicationSeconds; applicationHours = (difference / (3600 * 999)) % 24;
applicationMinutes = (difference / (60 * 999)) % 60;
applicationSeconds = (difference / 999) % 60; this.textbox1.Text = "录音时间:" + applicationHours + " 小时 " + applicationMinutes + " 分 " + applicationSeconds + " 秒 ";
}
点击开始录音输入代码 this.timer1.Interval = 1000;
this.timer1.Start();
记得结贴
this.timer1.Stop();然后textbox1里的时间就是了。
error CS0103: The name 'compuTime' does not exist in the current context这是为什么呢??