Vb

fathiaboujnah Messages postés 3 Statut Membre -  
fathiaboujnah Messages postés 3 Statut Membre -
Bonjour,
svp pouvez vous m'aidez pour trouver l'interface graphique pour ce code vb6
//
// if COM3 is shown in device manager then put COM4 in foll statement
//
Dim SMSEngine As New SMSCOMMS("COM4")

'the port needs to be initialised

SMSPort = New SerialPort
With SMSPort
.PortName = COMMPORT
.BaudRate = 19200
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
End With

'this is the set of AT commands to be written on serial port

SMSPort.WriteLine("AT")
'set command message format to text mode(1)
SMSPort.WriteLine("AT+CMGF=1" & vbCrLf)
'set service center address (which varies for service providers (idea, airtel))
SMSPort.WriteLine("AT+CSCA=""+21620657688""" & vbCrLf)
' enter the mobile number whom you want to send the SMS
SMSPort.WriteLine("AT+CMGS= + TextBox1.text + " & vbCrLf)
_ContSMS = False
SMSPort.WriteLine("+ TextBox1.text +" & vbCrLf & Chr(26)) 'SMS sending

Dim i As Integer
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

SMSEngine.Open() 'open the port
SMSEngine.SendSMS() 'send the SMS

End Sub

2 réponses

  1. lermite222 Messages postés 9042 Statut Contributeur 1 199
     
    Bonjour,
    Déjà que...
    Private Sub Button1_Click(ByVal sender As System.Object, 
    ByVal e As System.EventArgs) Handles Button1.Click

    C'est pas du VB6 mais du VB.Net, probablement VB2010
    Et tu veux un graphique de quoi ?
    A+
    0
  2. fathiaboujnah Messages postés 3 Statut Membre
     
    oui mais je cherche une interface graphique pour exécuter ce programme
    0