gray laptop computer showing html codes in shallow focus photography

How to make a Windows Phone 7 Vibrate using C# ?

Vibrate a phone? for what? Well, there are many reasons or situations that suit vibrating the phone some of them include the notifications that are sent to the WP7 or when the user should actually feel that he has touched/clicked a button on the Phone.

Fortunately , the Windows Phone 7 SDK allows the developers to vibrate the phone easily .

The Class VibrateController allows the developers to do this task .

How to make a Windows Phone 7 Vibrate using C# ?

The VibrateController class is defined in the namespace Microsoft.Devices .

private void button1_Click(object sender, RoutedEventArgs e)
{

       VibrateController vibrate = VibrateController.Default;
       vibrate.Start(TimeSpan.FromMilliseconds(1000));

}

You can use the methods Start and Stop of VibrateController to switch on / off the Vibrate controller

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...