Announcement

Collapse
No announcement yet.

getting real time quotes and threads

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getting real time quotes and threads

    I just started using the activex ciontrol...I can get a quote but I am having problems displaying it...According to the Visual Basic developer reference doc it says to get streaming real time quotes by doing this:

    Private Sub esignal_OnQuoteChanged(ByVal sSymbol As String)
    Dim quote As IESignal.BasicQuote

    quote = esignal.GetBasicQuote(sSymbol)

    edtBid.Text = Str$(quote.dBid)
    edtAsk.Text = Str$(quote.dAsk)
    edtLast.Text = Str$(quote.dLast)
    End Sub

    I am assuming that edtBid and edtAsk are text box controls on my form. But when I try to update them in I get an error message that says cannot update a control that was created in another thread...

    Am I missing something?

    Thanks in Advance,
    Eric

  • #2
    'getting real time quotes and threads

    The eSignal examples for processing quote and history requests are not thread safe. The reason is that the form and its contents are created in your mainline and the sample code tries to update them while in the asynchronous (Handler) thread. Either turn of thread safe checking or implement thread safe handling of the forms controls. MSDN has useful information about making VB code thread safe.

    Comment


    • #3
      thanks

      Thanks...I figured it was something like that...just didn't know what to start looking for...

      Comment

      Working...
      X