Results 1 to 7 of 7

Thread: Little Help Here???

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    20

    Question Little Help Here???

    I need to write a loop that send text after a certain interval... How do i do that???
    Thank you for ur assistance...

    Private Sub CmdSend_Click()

    Dim mystring As String

    If txtSend.Text = "" Then txtSend.SetFocus
    mystring = txtSend.Text
    txtRecv = mystring
    MSComm1.Output = Right$(mystring, 157) + vbCr

    End Sub
    KamuiShirou

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Just use a timer.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    20

    Question Timer???

    Meaning using the following sentence in my function:
    Timer1.Interval = 10000
    Is that wat u mean???
    thank you for ur assistance.
    KamuiShirou

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    No I mean add a Timer control to the form and at the form load or at the button press then set the Timer1.Interval=10000 and make sure it is enabled (Timer1.Enabled=True). Then in the Timer1_Timer event put any code you want to execute as frequently as the interval.

  5. #5
    oo7
    Guest

    Ya..........

    Correct just use a timer will do all the job
    Girl, do you understand???

  6. #6
    Hyperactive Member Ambivalentiowa's Avatar
    Join Date
    Apr 2002
    Location
    Coming soon to a store near you!
    Posts
    375

    Re: Little Help Here???

    VB Code:
    1. Private Sub CmdSend_Click()
    2.  
    3. Dim mystring As String
    4.  
    5.     If txtSend.Text = "" Then txtSend.SetFocus
    6.     mystring = txtSend.Text
    7.     txtRecv = mystring
    8.     MSComm1.Output = Right$(mystring, 157) + vbCr
    9.    
    10. End Sub

    What is the point of the line txtRecv=mystring? Isn't mystring the string you're sending, not recieving?
    -Show me on the doll where the music touched you.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    20
    Yes...
    but i need to see if wat i send is wat i received......
    KamuiShirou

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width