Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
It's a program that opens Google search bar and if enter is pressed on it, opens Google search for the term in the textbox, and if Ctrl+Enter is pressed, I'm Feeling Lucky is opened (the first result is opened), I made a button in the form that is accept button, and when Enter is pressed on the form the button gets clicked and no sound is played, however if Ctrl+Enter are pressed an ugly Windows sound is played, I want that when the user presses Ctrl+Enter prevent Windows from playing the ugly sound.

Search From Desktop[^]

What I have tried:

if (Properties.Settings.Default.feelingLuckyWeb || Program.LeftCtrlDown || Program.RightCtrlDown)
                        {
                            System.Diagnostics.Process.Start("http://www.google.com/search?q=" + System.Net.WebUtility.UrlEncode(textBoxMain.Text) + "&btnI");
                                               }
                        else
                        {
                            System.Diagnostics.Process.Start("https://www.google.com/search?q=" + System.Net.WebUtility.UrlEncode(textBoxMain.Text));
                        }
Posted
Updated 8-Feb-18 20:06pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900