colors

You can talk about VB programming here

colors

Postby GODFATHER-GM_01 » Wed Sep 27, 2006 1:56 am


guys i am working on the send text to room and i dont like that color can yous give me a code to put a other color for the text t.y
User avatar
GODFATHER-GM_01
Forum Moderator
Forum Moderator
 
Posts: 221
Joined: Tue Jul 11, 2006 1:02 am
Location: GYPSY MOBB

Postby locohacker » Wed Sep 27, 2006 8:32 am

Aigh this is how I do it :)

I first add a the richtextbox and the common dialog components. You can do this by going to the project menu then click on components there select
Microsoft Common Dialog Control 6 (SP6)
Microsoft Rich Textbox Control 6 (SP6)
select those two then click on apply then click on close

aigh now you will see those two components added to your components box, now select them from there and drag them to your form.

the Rich Textbox you put it where u want it to be
the Common Dialog you can put it anywhere it wont be visible when the program starts.

Now we goign to add 5 commands buttons one for boldnes three for the font size and another one for the color.

on the command for boldness enter this code
Code: Select all
RichTextBox1.SelBold = True

on the font size bottons add this code depending on the size u want for ur font, one thing paltalk only accepts up two 12 the number of the font I think so only go up to 12, here the codes to add
Code: Select all
RichTextBox1.SelFontSize = 8

Code: Select all
RichTextBox1.SelFontSize = 10

Code: Select all
RichTextBox1.SelFontSize = 12

and on te color buttom add this
Code: Select all
CommonDialog1.ShowColor
RichTextBox1.SelColor = CommonDialog1.Color

thas it now when people highlight the font and choose any of those fnt style the font will chnage accordingly :)
ah here departure code with the font color option :wink:
Attachments
Send text to any paltalk buildcolor.rar
(3.5 KiB) Downloaded 204 times
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby GODFATHER-GM_01 » Thu Sep 28, 2006 8:50 am

yo thanks men for your help but stlil some bugs with the send text this code right here is not working [code]Private Sub Command1_Click()
palsend text1
End Sub i got to fix it
User avatar
GODFATHER-GM_01
Forum Moderator
Forum Moderator
 
Posts: 221
Joined: Tue Jul 11, 2006 1:02 am
Location: GYPSY MOBB

Postby GODFATHER-GM_01 » Thu Sep 28, 2006 8:52 am

...
User avatar
GODFATHER-GM_01
Forum Moderator
Forum Moderator
 
Posts: 221
Joined: Tue Jul 11, 2006 1:02 am
Location: GYPSY MOBB

Postby locohacker » Thu Sep 28, 2006 9:15 am

ah u need to use this code on the send button :D
Code: Select all
Palsend RichTextBox1.TextRTF
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby GODFATHER-GM_01 » Thu Sep 28, 2006 10:26 am

thanks loco men it works great heres the download
Attachments
pal text.zip
(10.19 KiB) Downloaded 142 times
User avatar
GODFATHER-GM_01
Forum Moderator
Forum Moderator
 
Posts: 221
Joined: Tue Jul 11, 2006 1:02 am
Location: GYPSY MOBB

Postby locohacker » Thu Sep 28, 2006 2:24 pm

works great, great start you see how easy it is :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby GODFATHER-GM_01 » Thu Sep 28, 2006 2:53 pm

ya men it was ez thanks to you i know how to program and thanks for helping me code it :D
User avatar
GODFATHER-GM_01
Forum Moderator
Forum Moderator
 
Posts: 221
Joined: Tue Jul 11, 2006 1:02 am
Location: GYPSY MOBB


Return to Visual Basic Programming

Who is online

Users browsing this forum: No registered users and 0 guests