isnt that just a very long beep? note that the kernel32 beep isnt the .net beep (the .net beep will give you the windows error 'klunk' while the kernel32 beep will generate a tone with the given amount of hertz during the given amount of milliseconds)
but now that i think about it, not sure how it works with the 'wave' part..
did i quick google for ya and found this[^] its in vb6 a bit old...and not directly what you need. but it might be able to help you (or so i think)
I put that code on a button_click event in a UserControl that I made.
It is supposed to work as a boolean. eg if the value is 1 then it should change it to 0
else if the value is 0 it should change it to 1.
The click event is not going to work for this. Click is fired after the button is pushed AND released.
Similar code has to be called by the MouseDown, MouseUp, KeyDown and KeyUp handlers. The xDown events fire when the button is pushed down and the mouse or key is still being held down. The xUp events fire when the mouse or key is released.
before selecting another event to let your code,
make a breakpoint after bottun_click() line,run your control in dubug mode check if
break point stop your program,therefore event has no problem,then check your condition state.
If you mean the Button1 handler should modify the Button1 text, then I see no problem, that works just fine. Mind you, you will see the results only after the Click handler has finished (unless you add a call to Refresh). So changing the text initially, performing a long operation, then changing the text back to its original, all in the one Click handler, will not show any change at all. But then, you shouldn't be doing long operations inside a handler on the GUI thread to begin with... Threads (and BackgroundWorkers) were invented to decouple long operations from the GUI thread.
Then you are doing something wrong. Maybe you have more than one Button1 in your project, and you're talking to the wrong one (it helps to use meaningful names). Maybe its initial text isn't neither "0" nor "1". Maybe ...
You will need to provide a more comprehensive description of what you have if you want to get more effective help around here.