Jump to content
Xtreme .Net Talk

TVFavorites

Members
  • Posts

    3
  • Joined

  • Last visited

TVFavorites's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I�m fairly new at VB.Net and I�m having a few problems highlighting text in a Rich Text Box. I am working on a text editor that will have some text in the RTF Box and a regular text box where the user can enter a search term. When the find button is clicked, the first occurrence of the search term in the RTF box is highlighted if it exists in the Rich TextBox. If find is clicked again, the highlight moves to the next occurrence of the search term and so on. What I have done so far (not sure if this is the best way) is to put the contents of the RTF box into a string variable, search the string with the RTF contents for the find term, highlight the term, and then remove the first occurrence of the search term and everything before it from the string. Problem is, the RTF textbox displayed will need to keep all of the text, so when I search again, the highlighting messes up. Can someone help me with this?
  2. I have resolved the problem. Thanks for the help!
  3. Hi, I am trying to create a program with a movable button that stays inside the boundaries of a group box. What I am trying to do is have the button move in a direction until it hits the group box border, then the button will move in the opposite direction. So far, I can get the button to move to the border and stop, but I can't figure out how to move it back in the opposite direction. With the IF statements I am using, the button will just move back and forth by one pixel after it reaches the corner of the group box. I feel I am overlooking something obvious. Any insight would be appreciated. Thanks!
×
×
  • Create New...