title: How to know when a particular string has displayed in a scrolling application
body: <p>I need help in working out a logic in my scroller application that would make it more resourceful. Its designed with vb.net 2012. The app has 2 labels. One for scrolling contents and the other to display something else like a header.</p>
  <p>The text file has contents for different sections (ITD, HSE, GENERAL, e.t.c) See sample below:</p>
  <blockquote>
  <p>[ITD - 05/MAY/17 1:20pm - THERE WILL BE TEMPORARY NETWORK OUTAGE IN COMPUTER ROOM FROM 10AM FOR MAINTENANCE WORK]</p>
  <p>[HSE - 01/MAY/17 1:20pm - SAFETY ALERT: ONGOING CONSTRUCTION WORK AT THE WALKWAY. PLEASE DO NOT USE THE WALKWAY TO AVOID INJURIES]</p>
  <p>[GENERAL - 07/Apr/17 2:00pm - PUBLIC HOLIDAYS HAS BEEN SCHEDULED FOR OCT 1st 2017]</p>
  </blockquote>
  <p>The scroller application pulls information from the text file with the file.readalltext method. See code below</p>
  <pre><code>lblScroller.Text = File.ReadAllText(FILE_NAME).Replace(vbCr &amp; vbLf, &quot; &quot;)
  </code></pre>
  <p>Then a code scrolls the contents from right to left.</p>
  <p><strong>I want to know how the app can check when a particular text scrolls into display on the label control and then the other label would also change to the name of the section.</strong></p>
  <p>For example, the app would check when the string <strong>HSE</strong> scrolls into display, and then the other label would change to HSE. Users will then know that the information scrolling is from HSE. When the string GENERAL scrolls in, the label changes to GENERAL.</p>
  <p>I had taught of using different text files for each section or departments but it didn't work effectively.</p>