Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB 5.0 Rich Text Box Command

Posted on 1997-07-22
12
Medium Priority
?
241 Views
Last Modified: 2010-07-27
I want to find a way to display a string (say a single
word) in a rich text box control such that the user can
only interact with it (e.g., select or delete) as a single
unit.

[I have a program that displays various "paragraphs" of information in a rich text box at the click of a command button.  It is my desire to make the headings of these paragraphs (which will be in bold type) uneditable by the end-user.  I anticipate there being an RTF code similar
to \protect, but that will not allow selection of part of
the word.]
0
Comment
Question by:chem7
  • 5
  • 4
  • 2
  • +1
12 Comments
 

Expert Comment

by:Todd21
ID: 1428717
Do you mean they click on an option button or they click on a check box and it displays something in a text box?
0
 

Author Comment

by:chem7
ID: 1428718
Edited text of question
0
 

Expert Comment

by:Todd21
ID: 1428719
Reply with all the info you want to Todd@Programmer.net and I can help you out and send you a file then you can tell me if that is what you want
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:olx
ID: 1428720
please send email to olx@hotmail.com explaining what do you need


0
 

Author Comment

by:chem7
ID: 1428721
Edited text of question
0
 

Author Comment

by:chem7
ID: 1428722
Adjusted points to 100
0
 

Author Comment

by:chem7
ID: 1428723
Adjusted points to 210
0
 
LVL 3

Accepted Solution

by:
vmpn earned 420 total points
ID: 1428724
In the properties of textbox there are seltext,selstart and sellength you can use this values to check if user selected one of the headers in keydown event, if it is a header you can set keyascii=0 to cancel any edition by user for selection or place.

Sincerely,
VMPN
0
 
LVL 3

Expert Comment

by:vmpn
ID: 1428725
I ment keycode not keyascii

Sincerely,
VMPN
0
 
LVL 3

Expert Comment

by:vmpn
ID: 1428726
Sorry,I meant keycode not keyascii

Sincerely,
VMPN
0
 

Author Comment

by:chem7
ID: 1428727
  I should be able to implement this in code.  I'm giving
the solution a 'B' (and not an 'A') only because I was hoping
for a more elegant solution.
0
 
LVL 3

Expert Comment

by:vmpn
ID: 1428728
I understand.  If you'll need further assistance regarding this question,you can email me at vmpn@aol.com.

Sincerely,
VMPN
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question