Need help fast :)
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Hello,
can anyone help me out please
i asked a lot of people but no luck :(
i have a label like for example
hello my mail is test@test.com contact me
so i want to replace the test@test.com with a control on the same place
of this test@ instead of that text
do you understand what we are asking?
because it seems it overlap the text :(
see this image:

we have tried this
thanks +rep if you solved it
can anyone help me out please
i asked a lot of people but no luck :(
i have a label like for example
hello my mail is test@test.com contact me
so i want to replace the test@test.com with a control on the same place
of this test@ instead of that text
do you understand what we are asking?
because it seems it overlap the text :(
see this image:

we have tried this
Code: Select all
but you see the image not working.Dim correctString As String = Text.Replace(email, llLabel.Text)
llLabel.Ls.Add(0, llLabel.Text.Length, sLType & correctString)
thanks +rep if you solved it

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
It it's a static string, you can make a small class to generate that text. Below is a sample class.
P.S.: Sorry for the Skype incident, it crashed.
Code: Select all
Another approach can be take the text, and model it (will only work if the "email" is at a constant place [or index] )
Friend Class Helper
Private Const _placeHolder As String = "hello my mail is {0} contact me"
Public Shared Function getFormattedString(ByVal email As String) As String
Return String.Format(_placeHolder, email)
End Function
End Class
Code: Select all
I hope this helps, (want more: PM me)
Dim str As String = lblHolder.Text
str.Split(New Char() {" "})(4) = "someemail@email.com"
lblHolder.Text = String.Join(" ", str.Split(New Char() {" "}))
P.S.: Sorry for the Skype incident, it crashed.
sorry but this _placeholder don't work with me.text
and not what i'm looking for :(
not even close.
we don't need a split thing
we only want to add a control on the place of the email
thats all
and not what i'm looking for :(
not even close.
we don't need a split thing
we only want to add a control on the place of the email
thats all

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
i tried
#visualtech
even your code seems to be an error
Code: Select all
but same as my image :( overlaps mai = Regex.Matches(text, "([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})")
#visualtech
even your code seems to be an error
Code: Select all
str.Split(New Char() {" "})(4) = "someemail@email.com" 'we replace with shorter mail and get this error
System.IndexOutOfRangeException was unhandled
HResult=-2146233080
Message=Index was outside the bounds of the array.
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
why does it have to be one label why not just make a useraccountcontrol and have 3 label
Label 1 = whatever
Label 2 = the email
Label 3 = what ever
then just code a simple little text change or link label class or something
Label 1 = whatever
Label 2 = the email
Label 3 = what ever
then just code a simple little text change or link label class or something
sorry guys but i'm not agree with #muttley1968 this time
i really want to do my way
i really want to do my way

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
#noypikami, one problem would be that the string will automatically truncate itself and will look pathetic (e.g.: somethigaf...).
#Dummy1912, come on the chat.
#Dummy1912, come on the chat.

well why dont you consider using a sorta hotspot thing so were the email is just underline it and change blue with simple code for syntaxing and then add a transparent panel to the location and size of that area of text :P
seems i need to get the location of the string
i tried
Code: Select all
if i can find the locatio of the string i can replace it with my control.Left += ?
i tried
Code: Select all
but not working :(fidx2 = 0
For fidx1 = 0 To Text.Length - 1
If fidx2 >= Text.Length Then Exit For
fidx2 = Text.IndexOf("mailto:", fidx2)
If fidx2 = -1 Then Exit For
fidx2 += 1 'to find next
Next
llLabel.Left = fidx2
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
Copyright Information
Copyright © Codenstuff.com 2020 - 2023