First Snips (Replace :) with real smiley image)
Use this board to post your code snippets - tips and tricks
Hello Guys,
Well this will be the first time i gonna do this
maybe in the future i do more
this code i have work with a friend of my.
he always wanted to replace his text smiley's into a real one.well ...
today it finally did:
and BE CAREFUL be nice to me...
Dummy1912
Well this will be the first time i gonna do this
maybe in the future i do more
this code i have work with a friend of my.
he always wanted to replace his text smiley's into a real one.well ...
today it finally did:
Code: Select all
Well hope you like this guys'What do we need?:
'Richtextbox
Private Sub RichTextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
'When you add :p this text it will change directly into a smiley
'Just add more smileys and always create a new Sub PasteSmiley
Dim matches = Regex.Matches(Me.RichTextBox1.Text, ":\)")
Dim matches2 = Regex.Matches(Me.RichTextBox1.Text, ":p")
For Each m As Match In matches
If m.Success Then
Me.RichTextBox1.SelectionStart = m.Index
Me.RichTextBox1.SelectionLength = m.Length
Me.PasteSmiley()
End If
Next
For Each m As Match In matches2
If m.Success Then
Me.RichTextBox1.SelectionStart = m.Index
Me.RichTextBox1.SelectionLength = m.Length
Me.PasteSmiley2()
End If
Next
matches = Nothing
matches2 = Nothing
End Sub
Public Sub PasteSmiley()
Using i = Image.FromFile("C:\temp\smile.gif")
Clipboard.SetImage(i)
Me.RichTextBox1.Paste()
End Using
End Sub
Public Sub PasteSmiley2()
Using i = Image.FromFile("C:\temp\smile2.gif")
Clipboard.SetImage(i)
Me.RichTextBox1.Paste()
End Using
End Sub
and BE CAREFUL be nice to me...
Dummy1912
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Hey Tim,
Nice, I've never seen this here.
Thanks for sharing this with us, and I have been searching for something for months lol.
Keep it up cooll;
Nice, I've never seen this here.
Thanks for sharing this with us, and I have been searching for something for months lol.
Keep it up cooll;
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
I'm not crazy, my mother had me tested. ~Sheldon Cooper
Hey Buddy,
I'm happy to hear that
well maybe next time if you search for something ask me maybe i can help you out blusho;
Tim
I'm happy to hear that
well maybe next time if you search for something ask me maybe i can help you out blusho;
Tim
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Cool tutorial Tim!! Useful for a chat app!!
Instead of LOL use this -
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
blusho; thanks guys
hope i can add more soon
Dummy1912
hope i can add more soon
Dummy1912
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Very nice, thank you alot, like agust, i have been searching for this for months.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Such things is hard to find, thanks for posting Tim!
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
thanks buddy
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Awesome Job!!
Going to use this in a chat, thank you!
Going to use this in a chat, thank you!
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that
Copyright Information
Copyright © Codenstuff.com 2020 - 2023