1. HP (Hanya untuk model nokia)
2. Connecting Device (Seperti : Infrared, Kabel data, or Bluetooth)
3. Download dan install program Nokia PC Connectivity SDK yang sesuai dengan model ponsel Nokia yang kamu gunakan.
Prosedur
1. Install semua alat koneksi (seperti :Infrared, DataCable, or Bluetooth) kedalam PC
Perhatian : Pastikan setelah terinstall alat koneksi dengan HP terhubung dengan baik
2. Install program aplikasi Nokia PC COnnectivity.
3. Buka VB dan kemudian mulai dengan membuat project baru
4. Add komponen Nokia dalam menu preferences yang ada di VB
5. Kemudian isi dengan Script dibawah ini
Private Sub cmdSend_Click()
On Error GoTo ErrorTrap
Dim message As String
message = txtMsg.Text
Select Case chkUnicode.Value
Case vbUnchecked
If (Len(message) > SMS_TEXT_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_TEXT_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_TEXT_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case vbChecked
If (Len(message) > SMS_UNICODE_MAX_SIZE) Then
pMsgPart1 = Left(message, SMS_CONCATENATED_UNICODE_MAX_SIZE)
pMsgPart2 = Right(message, Len(message) - SMS_CONCATENATED_UNICODE_MAX_SIZE)
SendConcatenatedMessage
Exit Sub
End If
Case Else
MsgBox ("Select coding scheme")
End Select
Dim smsEntry As NokiaCLMessaging.ShortMessageItem
Set smsEntry = New NokiaCLMessaging.ShortMessageItem
smsEntry.Type = SHORTMESSAGE_TYPE_GSM_SUBMIT
Set pIGSMSubmit = smsEntry.TypeProperties
pIGSMSubmit.message = txtMsg.Text
pIGSMSubmit.DestinationAddress = txtDestination.Text
pIGSMSubmit.ServiceCenterAddress = txtMsgCenter.Text
pIGSMSubmit.ProtocolID = 0
If (chkUnicode.Value = vbChecked) Then
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_UNICODE
Else
pIGSMSubmit.DataCodingScheme = CODING_SCHEME_TEXT
End If
pIGSMSubmit.ValidityPeriodRelative = 255
Call pSMSAdapter.SendSMS(SHORTMESSAGE_ROUTE_TYPE_ANY, pIGSMSubmit)
'Insert your code here to store the sent message in the database.
MsgBox "Message Sent TO " & txtDestination.Text & vbCrLf & "With Reference Number: " & pIGSMSubmit.MessageReference, vbOKOnly, "Message Sent"
Exit Sub
ErrorTrap:
If Err.Number = -2147467259 Or Err.Number = -2147467259 Then
End If
MsgBox Err.Description, vbInformation, "SMS Cannot Send"
End Sub
Nah mudah bukan? Silakan kamu kembangkan sendiri dari aplikasi yang sudah dibuat penulis...
No comments:
Post a Comment