Click here to Skip to main content
16,005,149 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help with vbscript and Windows NT Pin
Dave Kreskowiak26-Mar-06 12:42
mveDave Kreskowiak26-Mar-06 12:42 
GeneralRe: Help with vbscript and Windows NT Pin
Its due when26-Mar-06 12:56
Its due when26-Mar-06 12:56 
GeneralRe: Help with vbscript and Windows NT Pin
Dave Kreskowiak26-Mar-06 13:10
mveDave Kreskowiak26-Mar-06 13:10 
GeneralRe: Help with vbscript and Windows NT Pin
Its due when26-Mar-06 13:36
Its due when26-Mar-06 13:36 
QuestionTread problem Pin
blucas200525-Mar-06 17:35
blucas200525-Mar-06 17:35 
AnswerRe: Tread problem Pin
Dave Kreskowiak26-Mar-06 4:26
mveDave Kreskowiak26-Mar-06 4:26 
Questionget callerid Value by vb.net 2003 Pin
SVb.net25-Mar-06 11:23
SVb.net25-Mar-06 11:23 
AnswerRe: get callerid Value by vb.net 2003 Pin
Recep Tarakci25-Mar-06 19:57
Recep Tarakci25-Mar-06 19:57 
hi friend

you are use msscommlib.ocx. add project mscomm and set ComPort value 3.
add to project ; 1 button control , 1 timer , 1 textbox control

button control text = Connect
timer1 interval = 100
timer1 enable = false


-----------------------------------------------------------------------
Dim mscomm1 As New MSCommLib.MSComm

Send AT command to modem

<br />
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click<br />
    <br />
        Try<br />
            mscomm1.CommPort = 3<br />
            mscomm1.PortOpen = True<br />
            mscomm1.Output = "AT#CID=1" & Chr(13)<br />
<br />
            TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
<br />
<br />
            mscomm1.Output = "AT%CCID=1" & Chr(13)<br />
            TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
<br />
            mscomm1.Output = "AT+VCID=1" & Chr(13)<br />
            TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
<br />
            mscomm1.Output = "AT#CC1" & Chr(13)<br />
            TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
<br />
            mscomm1.Output = "AT*ID1" & Chr(13)<br />
            TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
<br />
            Timer1.Enabled = True<br />
<br />
<br />
        Catch ex As Exception<br />
            MsgBox(ex.message)<br />
        End Try<br />
<br />
<br />
    End Sub<br />


anyone return OK value , your modem support CallerID , if all value return ERROR your modem not support CallerID.

now timer1.enable = true and my program listen a COM3 and return value write a textbox control.

 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick<br />
        TextBox1.Text = TextBox1.Text & mscomm1.Input<br />
End Sub


if telephone ringing , textbox control text changed and display callerID value

RING

DATE ........

TIME ........

NUMBER .......

RING

RING

--------------------------------------
get number value the text control

Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged<br />
        modemcontrol()<br />
End Sub



<br />
Sub modemcontrol()<br />
        Try<br />
            Dim m As String<br />
            Dim r As String = TextBox1.Text<br />
            m = r.Substring(123, 1)<br />
<br />
            If m = "0" Then<br />
                r = r.Substring(123, 11)<br />
                GoTo there<br />
            End If<br />
<br />
            If m = "P" Then<br />
<br />
                Timer1.Enabled = False<br />
                    mscomm1.PortOpen = False<br />
<br />
                TextBox1.Text = ""<br />
                MsgBox("hidden number")<br />
<br />
<br />
            Else<br />
<br />
                r = r.Substring(123, 7)<br />
<br />
<br />
<br />
            End If<br />
there:<br />
<br />
            Timer1.Enabled = False<br />
<br />
            mscomm1.PortOpen = False<br />
<br />
            TextBox1.Text = ""<br />
<br />
            msgbox("Call number  : " & r )<br />
<br />
        Catch ex As Exception<br />
<br />
        End Try<br />
    End Sub<br />

QuestionData Binding an Image to MS Access Pin
JMS7625-Mar-06 9:32
JMS7625-Mar-06 9:32 
AnswerRe: Data Binding an Image to MS Access Pin
Recep Tarakci25-Mar-06 9:46
Recep Tarakci25-Mar-06 9:46 
QuestionGet CallerID value using Visual Basic.NET 2005 Pin
Recep Tarakci25-Mar-06 9:08
Recep Tarakci25-Mar-06 9:08 
QuestionSQL Statemnt problems Pin
LeRoiScorpion25-Mar-06 9:01
LeRoiScorpion25-Mar-06 9:01 
GeneralRe: SQL Statemnt problems Pin
Guffa25-Mar-06 10:22
Guffa25-Mar-06 10:22 
GeneralRe: SQL Statemnt problems Pin
LeRoiScorpion25-Mar-06 18:33
LeRoiScorpion25-Mar-06 18:33 
AnswerRe: SQL Statemnt problems Pin
Guffa25-Mar-06 18:42
Guffa25-Mar-06 18:42 
GeneralRe: SQL Statemnt problems Pin
LeRoiScorpion25-Mar-06 18:48
LeRoiScorpion25-Mar-06 18:48 
AnswerRe: SQL Statemnt problems Pin
Guffa26-Mar-06 3:59
Guffa26-Mar-06 3:59 
QuestionSend Files VIA IP Pin
ADY00725-Mar-06 5:54
ADY00725-Mar-06 5:54 
QuestionDirectSound & Speakers Pin
Superwill25-Mar-06 4:29
Superwill25-Mar-06 4:29 
QuestionAutomatic generation of numbers Pin
Arun Hegde25-Mar-06 2:58
Arun Hegde25-Mar-06 2:58 
AnswerRe: Automatic generation of numbers Pin
Murtuza Husain Miyan Patel25-Mar-06 6:18
professionalMurtuza Husain Miyan Patel25-Mar-06 6:18 
AnswerRe: Automatic generation of numbers Pin
rikky_22225-Mar-06 17:39
rikky_22225-Mar-06 17:39 
AnswerRe: Automatic generation of numbers Pin
Solid Snake26-Mar-06 7:19
Solid Snake26-Mar-06 7:19 
QuestionControl a video projector - which way is best? Pin
yomam25-Mar-06 1:29
yomam25-Mar-06 1:29 
AnswerRe: Control a video projector - which way is best? Pin
Guffa25-Mar-06 20:54
Guffa25-Mar-06 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.