Click here to Skip to main content
15,911,762 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: hoe to access last record in Access 2000 table Pin
Swiss Mantoro8-Sep-05 23:15
Swiss Mantoro8-Sep-05 23:15 
Generalhoe to access last record in Access 2000 table Pin
Swiss Mantoro8-Sep-05 23:21
Swiss Mantoro8-Sep-05 23:21 
Questiondynamic RichTextBox accesing the Selection FontStyle Pin
Taen_Karth8-Sep-05 17:40
Taen_Karth8-Sep-05 17:40 
AnswerRe: dynamic RichTextBox accesing the Selection FontStyle Pin
Christian Graus8-Sep-05 17:59
protectorChristian Graus8-Sep-05 17:59 
GeneralRe: dynamic RichTextBox accesing the Selection FontStyle Pin
Taen_Karth8-Sep-05 18:10
Taen_Karth8-Sep-05 18:10 
GeneralRe: dynamic RichTextBox accesing the Selection FontStyle Pin
Christian Graus8-Sep-05 18:11
protectorChristian Graus8-Sep-05 18:11 
GeneralRe: dynamic RichTextBox accesing the Selection FontStyle Pin
Taen_Karth9-Sep-05 16:40
Taen_Karth9-Sep-05 16:40 
AnswerRe: dynamic RichTextBox accesing the Selection FontStyle Pin
PranjalSharma12-Sep-05 0:28
PranjalSharma12-Sep-05 0:28 
ok you try doing in this way
create a handler which handles selection change event. when you have created the RTB assign handler you created to it by

using AddHandler

In SelectionChange handler use this code
If sender.SelectionFont.Bold = True Then
Me.CheckBox1.Checked = True
Else
Me.CheckBox1.Checked = False
End If
if you have selected a text which has a bold text then checkbox would be checked other wise not checked. (Keep a check box on

form)
----------------------------------------
Here's The code
'handles RTB's Selection Change Event
Private Sub RTB_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
If sender.SelectionFont.Bold = True Then
Me.CheckBox1.Checked = True
Else
Me.CheckBox1.Checked = False
End If
End Sub


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim txt As New RichTextBox 'Define A New RTB
txt.Size = New Size(100, 100)
txt.Location = New Point(0, 0)
Me.Controls.Add(txt) 'Add RTB To Form
AddHandler txt.SelectionChanged, AddressOf Me.RTB_SelectionChanged 'Assign SelctionChange Event Handler
End Sub


Pranjal Sharma

GeneralRe: dynamic RichTextBox accesing the Selection FontStyle Pin
Taen_Karth13-Sep-05 12:39
Taen_Karth13-Sep-05 12:39 
QuestionHow to color each row of datagrid in VB6 Pin
crash_cverride8-Sep-05 16:43
crash_cverride8-Sep-05 16:43 
QuestionAdding a listbox datagridcolumn to datagridcolumnstyles Pin
Member 22599498-Sep-05 10:40
Member 22599498-Sep-05 10:40 
QuestionDrag and Drop Toolbar Pin
kenexcelon8-Sep-05 8:48
kenexcelon8-Sep-05 8:48 
Questionscreensaver application Pin
oakleaf8-Sep-05 8:04
oakleaf8-Sep-05 8:04 
AnswerRe: screensaver application Pin
MohammadAmiry8-Sep-05 10:07
MohammadAmiry8-Sep-05 10:07 
GeneralRe: screensaver application Pin
oakleaf8-Sep-05 12:38
oakleaf8-Sep-05 12:38 
QuestionProblem with Access SQL Pin
ecentinela8-Sep-05 6:58
ecentinela8-Sep-05 6:58 
AnswerRe: Problem with Access SQL Pin
KaptinKrunch8-Sep-05 7:11
KaptinKrunch8-Sep-05 7:11 
GeneralRe: Problem with Access SQL Pin
ecentinela8-Sep-05 7:15
ecentinela8-Sep-05 7:15 
GeneralRe: Problem with Access SQL Pin
KaptinKrunch8-Sep-05 7:56
KaptinKrunch8-Sep-05 7:56 
GeneralRe: Problem with Access SQL Pin
eagertolearn8-Sep-05 8:34
eagertolearn8-Sep-05 8:34 
QuestionPrinting Error Pin
Rothco8-Sep-05 6:13
Rothco8-Sep-05 6:13 
AnswerRe: Printing Error Pin
KaptinKrunch8-Sep-05 12:15
KaptinKrunch8-Sep-05 12:15 
QuestionAdvice Pin
mcgann8-Sep-05 4:42
mcgann8-Sep-05 4:42 
AnswerRe: Advice Pin
Christian Graus8-Sep-05 13:45
protectorChristian Graus8-Sep-05 13:45 
QuestionVery large LinkedList Pin
TheDarkMan8-Sep-05 1:32
TheDarkMan8-Sep-05 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.