for (long i=50;i <= 2000 ;i+=20)太短了加大就可以了!
解决方案 »
- 一个泛型的用法
- C#队列怎么操作,急急急急急急急急急
- 怎么知道datarow是否为空
- 如何将datagridvieew的列标题设置为combobox
- C#和C# builder的区别是什么?请推荐一两本经典的学习书入门。
- oleDbDataAdapter的selectCommand用了别名后UpData出现的怪问题,100分送上,在线等......
- 想搞个系统,大家给个思路。
- 很多个类之间操作的问题
- SharpPcap(封装Winpcap) 如何重定向?
- 关于JS传值的问题
- 如何或者组件所在目录?
- 我想做一個在下拉框中能夠取得想word一樣的字體,程序如下,可是有錯誤提眎,不知道該怎嗎解決??
using System.Runtime.InteropServices;
class test
{
[DllImport("kernel32.dll")]
private static extern int Beep(int dwFreq ,int dwDuration) ; public static void Main()
{
int a=0X7FF;
int b=1000;
Beep(a,b);
}
}
using System;
using System.Runtime.InteropServices;
class test
{
[DllImport("kernel32.dll")]
private static extern int Beep(int dwFreq ,int dwDuration) ; public static void Main()
{
int a=0X7FF;
int b=1000;
Beep(a,b);
}
}
叫出来下我一大跳,什么鬼调
[DllImport("kernel32.dll", EntryPoint="Beep")]
public static extern long beep(ref long dwFreq, ref long dwDuration);
BeepThe Beep function generates simple tones on the speaker. The function is synchronous; it does not return control to its caller until the sound finishes.
BOOL Beep(
DWORD dwFreq,
DWORD dwDuration
);Parameters
dwFreq
[in] Frequency of the sound, in hertz. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF).
Windows 95/98/Me: The Beep function ignores this parameter.dwDuration
[in] Duration of the sound, in milliseconds.
Windows 95/98/Me: The Beep function ignores this parameter.Return Values
If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.Res
private static extern int Beep(int dwFreq ,int dwDuration) ;
private void buttonTest_Click(object sender, System.EventArgs e)
{
int j=10;
for (int i=50;i <= 2000 ;i+=20) Beep(i,j);
}跟时间长短没有关系,按照breezem(夜空幽灵)这样写就好了~~~