1.

Solve : VB question?

Answer»

Im new to VB (started learning it at COLLEGE about 2 months ago)

now in my SPARE time, im creating a little word processor.

Ive ran into a really noobish problem as i dont know how to do this:

when you CLICK a tool strip button, it inserts it into a rich text box

Say, i want to INSERT a Code: [Select]<hr> into the rich textbox

How do i do it ?

THANKS in advanceCode: [Select]Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles ToolStripButton1.Click
RichTextBox1.Text = "<hr>"
End Sub

Set the Text property for the RichTextBox in the click event for the toolstrip button.

The above example is VB.Net. If your using VB6, it's the same method, double click the toolstrip button in design mode and set the RichTextBox text property to ""



Discussion

No Comment Found