Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,430 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,315 people online right now. Registration is fast and FREE... Join Now!




Beep on Key Press

 
Reply to this topicStart new topic

Beep on Key Press

PenguinThug
31 Jan, 2008 - 05:24 PM
Post #1

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 5


My Contributions
hi I'm am new here and I am in a programming class at my high school and I i was wondering if you can make a keypress eventand make it beep when you hit a letter or a number on the keyboard do u think you can help out?
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Beep On Key Press
31 Jan, 2008 - 09:36 PM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,164



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
Yes, this is very possible with VB.NET. Here are some links to get you started:

We won't do the code for you, you must show some effort on your behalf to get it done. smile.gif
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Beep On Key Press
31 Jan, 2008 - 09:41 PM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,298



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
You can also find a snippet on creating a beep here.
User is online!Profile CardPM
+Quote Post

PenguinThug
RE: Beep On Key Press
1 Feb, 2008 - 03:54 AM
Post #4

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 5


My Contributions
Thank you for the links i will check them out and if i still dont got it ill come back
smile.gif
User is offlineProfile CardPM
+Quote Post

PenguinThug
RE: Beep On Key Press
1 Feb, 2008 - 04:12 AM
Post #5

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 5


My Contributions
hi i got it to work but it makes the same beep for all tha keys wat should i do?

User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Beep On Key Press
1 Feb, 2008 - 05:01 AM
Post #6

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,164



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
You should change the frequency and duration of the beep to make different noises.
User is offlineProfile CardPM
+Quote Post

PenguinThug
RE: Beep On Key Press
1 Feb, 2008 - 09:12 AM
Post #7

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 5


My Contributions
i did change the frequency and the duriation but it still dosent work what should i do ?

User is offlineProfile CardPM
+Quote Post

Jayman
RE: Beep On Key Press
1 Feb, 2008 - 11:45 AM
Post #8

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,298



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Post the code that you are using.
User is online!Profile CardPM
+Quote Post

PenguinThug
RE: Beep On Key Press
1 Feb, 2008 - 12:07 PM
Post #9

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 5


My Contributions
CODE
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode.A Then
            Console.Beep(32767, 100)

        End If
        If e.KeyCode.B Then
            Console.Beep(22767, 100)

        End If
    End Sub

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 11:38AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month