color dialog

how can i make a color selected in a colordialog be the color pf the s

Page 1 of 1

0 Replies - 1921 Views - Last Post: 05 July 2008 - 03:49 PM Rate Topic: -----

#1 narmer93  Icon User is offline

  • D.I.C Regular

Reputation: 8
  • View blog
  • Posts: 317
  • Joined: 13-March 08

color dialog

Posted 05 July 2008 - 03:49 PM

hi i need to use a color dialog to change the color of selected text in a rich textbox
i finally can save the changes in the rich textbox even colors by the following way
insted of using colored lables with code
me.richtextbox.selectioncolor=color.red

this will make me make tons of it but i noticed the color dialog
i knew how to view it
colordalog.showdialog()

but i didn't know yet how to use its colors
can anybody help me with this? :D
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.RichTextBox1.LoadFile("filepath\microsoft word document.doc", RichTextBoxStreamType.RichText)

    End Sub
    Private Sub Form1_closed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
        Me.RichTextBox1.SaveFile(" filepath\microsoft word document", RichTextBoxStreamType.RichText)
    End Sub


this works only for type .doc but it doesn't work for the .docx(microsrosoft office word 2007) does anybody know why? :sad3:

and if there was a text in the clipboard
how can i copy it to a textbox?
i think it starts with
My.Computer.Clipboard.GetText .?????????????

but i don't know the rest of the code
i got its idea from youtube downloader
if somebody used it before so if the text in the clipboard starts with http:// so when mouse move,it copies the text to the textbox
using the mousemove is now easy but the rest is the problem

This post has been edited by narmer93: 05 July 2008 - 03:56 PM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1