求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#中BackGroundWorker的详细使用方法以及如何正确高效访问父窗体UI方法 cuteeditor缺少对象问题 关于c#数组的问题。I think it's easy question 定义一个application对象 跳圈游戏...拜托大家帮忙有没有改进一下..随便什么语言...谢谢了... 一个弱弱的问题 关于程序与服务之间的问题 datagrid如何在选择cell时 整个row 都被选择? 大神们,救命呀!!! 倒分 一段有问题的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这是为什么呢??