Solved

VB 5.0 Rich Text Box Command

Posted on 1997-07-22
12
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 210 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…

734 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