Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Beep Program.

timer

  • Please log in to reply
19 replies to this topic

#1 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 15 January 2009 - 02:28 PM

BEEP Program

Hello CodeCall ..

Today i'm gonna show you a very Easy tutorial but interesting..

We need 4 Buttons and a Timer ..

Add like this ..
Posted Image

Add the timer and the interval for that make 1500 or 2000 .

The First Button Rename with BEEP
If You type This Button it will BEEP only one time ..
and the Code for it is ..
    Console.Beep()

The Second Button Rename with START
If you type this button it will BEEP every Second ..
Code is ..
    Timer1.Start()

The Third Button Rename With STOP
If you type it it will stop the Beeping sound that you'll hear .
Code ..
    Timer1.Stop()

The Fourth Button Rename with QUIT
IT will quit the program
Code
End


Finally will look like this

Posted Image


Thanks , Mendim.
  • 2

#2 Guest_Jordan_*

Guest_Jordan_*
  • Guest

Posted 16 January 2009 - 09:27 AM

Very cool, I wonder if you could make a "beep" song with this. Any idea how console.beep() works? Also, don't you have the code wrong for the exit button (shouldn't it be me.exit)?
  • 0

#3 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 January 2009 - 10:19 AM

Doesn't there have to be some code to make the timer call console.beep()?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#4 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 19 January 2009 - 12:35 PM

Very cool, I wonder if you could make a "beep" song with this. Any idea how console.beep() works? Also, don't you have the code wrong for the exit button (shouldn't it be me.exit)?


Maybe it activates any hardware in your PC that makes a BEEPING Sound ..

It's the same end like me.exit
have the same function..:)
  • 0

#5 MathX

MathX

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1038 posts
  • Programming Language:Java

Posted 20 January 2009 - 11:51 AM

+rep
  • 0

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#6 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 24 January 2009 - 08:45 AM

Thanks , Broo . :)
  • 0

#7 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 15 March 2009 - 03:57 AM

What's the point of the timer? It doesn't do anything.

Didn't you mean to include:

Private Sub Timer1_Timer()
Beep
End Sub

?
  • 0

#8 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 15 March 2009 - 11:50 AM

Did u read the whole TEXT ??
the timer should be
Add the timer and the interval for that make 1500 or 2000 .

  • 0

#9 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 15 March 2009 - 12:07 PM

Yes I did but setting the interval doesn't do anything. You probably what a timer event in your vb.net program that calls console.beep every once and awhile?
  • 0

#10 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 15 March 2009 - 12:19 PM

Okay ..!
did it work for you ?
  • 0

#11 chili5

chili5

    CC Mentor

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3038 posts
  • Programming Language:Java, C#, PHP, JavaScript, Ruby, Transact-SQL
  • Learning:C, Java, C++, C#, PHP, JavaScript, Ruby, Transact-SQL, Assembly, Scheme, Haskell, Others

Posted 15 March 2009 - 12:30 PM

Yes it did! Just thought I'd mention what you missed because as is your timer does nothing.
  • 0

#12 mendim.

mendim.

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 741 posts

Posted 21 March 2009 - 04:59 AM

ah ..
okay ! (Y)
The timer was that how long will BEEP make Sound ..
but it doesn't function !

Main Thing is ." it Works "
  • 0





Also tagged with one or more of these keywords: timer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download