Saturday, 15 December 2012

Simple clock using note pad

Create a clock using note pad:

                                                          Lets create a simple clock using note pad.

Step 1:

            Go to your Desk top , right click on desk top ,select New and then Select Text Document.

             This will open note pad.

     Step 2:

                    Type the following code in this note pad
                     
                       MsgBox Time

Step 3:

               Go to File Menu and click on save as 
                this will show a save file dialog save
                Name it Welcome.vbs or Clock.vbs
                and click on all files in save as type.
                Then Click on Save.

                 
                        Now double click on this file and run it 
               it will simple shows a message box telling time in 12 hours format. 

Feel free to contact me at any time for any type of question. 
Please type a comment for more information and questions.

computer startup sounds

My computer say Welcome to me:

                                                      In this tutorial we are going to create such an application that speaks to you and will say you welcome at the every start up of your computer using Note Pad.

Step 1:

            Go to your Desk top , right click on desk top ,select New and then Select Text Document.

             

     Step 2:

                   This will open a new Text Document.
In this Text Document type the following code.

dim b
set b = CreateObject("sapi.spvoice")
b.speak"Welcome Mr Shakir, Its Good to see you again"
b.speak"Time is"
b.speak Time

Explanation:
       
dim b :
           creates a new Variable 

Set b:
           Set is used to change the property of the variable.
           In this program we Created a new object for speech library.

b.speak " Text ":
                             is used to speak the text typed after b.speak


Step 3:

               Go to File Menu and click on save as 
                this will show a save file dialog save
                Name it Welcome.vbs
                and click on all files in save as type.
                Then Click on Save.

                 

Step 4:

              Now copy this file

Step 5:

              Navigate to C:\Documents and Settings\All Users\Start Menu\Programs\Startup (in Windows XP)
and to 
C:\Users\ {User-Name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (in Windows 8, Windows 7 and Windows Vista) 
if C: is your System drive. 

Step 6:

             paste this file in Startup folder.

Now when ever you run this application or restart your computer this will say welcome to you.
Best of Luck 
Kindly type a comment for any kind of question for suggestion.
Feel free to contact me at any time.







Text to Voice Application

Text to Voice Application :

                                                in this tutorial we will create a text to voice application by using System.Speech.Synthesis step by step

Step 1:

              Start a new Windows form application in C sharp

Step 2:


          

    Go to solution explorer Right-Click on References 


Step 3:

            Then Click on Add references 

Step 4:

            Now first Click on .Net Then Click on System.Speech
then hit OK

          

Now we have added a new reference named System.Speech

Step 5:

             Now double click on your form.
now add a new name space using System.Speech.Synthesis;

Step 6: 

              Now Come back to your form and add a text box and on buttton
set text box property to Multi-line

Step 7:

          Now set the form as you wish your form should look like

Step 8:

             Double Click on Button 1 to add some code to it

Step 9:

                Type the following code under  Button 1 

            SpeechSynthesizer voice = new SpeechSynthesizer();
            voice.Speak(textBox1.Text);


            Step 10:

                          Now Run your program and enjoy text to speech application.
                         Type text in text box and click on button 1. It will speak for you.
                          
                                 Feel free to contact me for any question.