它是通过网络访问的
LED API
. 从…起
here
:
在大多数设备上,振动是设定的
至LED设备1。
下面是来自同一源代码的示例代码。
Private Structure NLED_SETTINGS_INFO
Public LedNum As Integer
Public OffOnBlink As Integer
Public TotalCycleTime As Integer
Public OnTime As Integer
Public OffTime As Integer
Public MetaCycleOn As Integer
Public MetaCycleOff As Integer
End Structure
<DllImport("Coredll")> _
Private Shared Function NLedSetDevice(ByVal deviceId As Integer, ByRef info
As NLED_SETTINGS_INFO) As Boolean
End Function
Private Shared Sub SetVibrate(ByVal state As Boolean)
Dim info As New NLED_SETTINGS_INFO()
info.LedNum = 1
info.OffOnBlink = If(state, 1, 0)
NLedSetDevice(1, info)
End Sub