CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2016
    Posts
    8

    Streaming Data to a Page

    I have an engineering applications where I am receiving real time data from two devices, an IMU and a GPS. While this data is coming in I'd like to be able to scroll the incoming data to something on a page as it comes in. Is there a way to do this? I have tried this both using the Universal Windows Platform and Windows Form. On both of these when I do a "write" to something like TextBox.text = "string" the data doesn't get sent until the method exits. Do if I put a series of these commands together in a loop only the last string sent to the TextBox is displayed. What I need is something like a console window in the application that I can write to in real time.

    Any suggestions?

    Andy Cruce

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Streaming Data to a Page

    Use a virtual listbox.

  3. #3
    Join Date
    Jun 2016
    Posts
    8

    Re: Streaming Data to a Page

    I would like the last list item entered in the list box to be on the top of the list not the bottom. I's also like to limit the size of the listbox so that if more items are entered than specified by the list box size I'd like the earliest listbox items entered to be deleted. I looked an couldn't identify any listbox method or parameters that would allow this. Is this type of setup for a listbox possible.

    Thanks,

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Streaming Data to a Page

    The key word in my previous post is 'virtual'. In a virtual listbox, the listbox is bound to a container that contains the listbox items.

    For your application, you would insert an item into the top of the list, and remove the last list item to prevent the list from growing past your desired size.

    All of this work is done at the container level and the virtual listbox just displays the contents of the container, whatever that may be.

    Read more about virtual listboxes in msdn.

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

Featured