0
我有這個示例代碼,我想使用。我不知道該把它放在哪裏。我使用Visual Studio 2008,Windows Mobile 6 sdk。我想測試加速度計,但我不確定我應該在哪裏編碼。開始是例如Form1上。我是否創建新的現有項目> new program.cs一個新的C#文件並執行此操作(如下所示)?在使用三星acclerometer
#include "smiAccelerometer.h"
SmiAccelerometerVector accel;
// get the acceleration vector containing X, Y, Z components
if (SmiAccelerometerGetVector(&accel) == SMI_SUCCESS)
{
// Successfully got acceleration.
// Use accel.x, accel.y and accel.z in your application
}
else
{
// failed to get the acceleration
}
你想做什麼?開發一個使用加速計輸入的應用程序? – TheCodeArtist 2010-04-23 04:54:58