Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / VB 6 Underline Text problem

Author
Message
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Sep 2011 02:36
I'm sending text from a string to a Text Dialogue page. If the numbers are the same as one another I want to underline them. But it seems to be very difficult to do. My test in the code box just tries to underline the number 3. If you can get that to work I can fix it to do matching numbers.

Thanks.



old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 10th Sep 2011 03:14 Edited at: 10th Sep 2011 03:18
http://www.youtube.com/watch?v=4XBpzlpRrgU


Well first upgrade to at least 2008, next get the P2P software or go grab a VB vid on how to send strings or classes. Im making a chat software my self currently. OO so many things wrong above. I recomend you check out you tube as its were I started before I decided to build my own chat system. Also MSDN has alot of examples and there is a free sample pack you can Download. It has a simple chat system in it as well. I highly recomend you review that then you will see your mistakes.

Edit:

2008 and 2010 Express are free btw and will work good enough to build a nice web chat ser/client system from scratch or useing the P2P tool package.

Edit:
Sorry above statements might come across rude. Ahh VB6 is extremely dated and should be replaced. Hence the suggestion. I know alot of people complain about 2006 to 2008 has big changes but not really. I think 2008/2010 are better. Just somehting you have to get use to if you want to use VB.
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Sep 2011 03:38
I like VB 6 the best, aren't the other ones NET? I don't like NET.

Anyway, I think it doesn't matter because the command can be sent to the printer instead. So I will try that.

old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 10th Sep 2011 17:12
In Vb i think its just Print, Id have to check MSDN for a printer command. I never used VB 6 but I herd and seen it. I was not impressed with it personaly. My only other recomenddation would be grab a old VB6 book and use it for a reference. I can ask some my other coders who have worked with VB6 but no primises.
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 10th Sep 2011 17:47
VB6 if very similar to VB.NET or VB2010. A few of the commands were changed to protect the innocent.

I really need a little more info. I don't know what a "Text Dialogue page" is, but I think to compare numbers it may be best to assign them as strings first.

Dim MyFirstNumber as String
Dim MySecondNumber as string
Dim Result as String = ""


Then use the sting manipulation of VB to determine which numbers in the string match. More specifically, Mid$. For example something like this...

For NumLength = 1 to Len(MyFirstNumber)
If Mid$(MyFirstNumber, NumLength, 1) = Mid$(MySecondNumber, NumLength, 1) then
Result$=Result$ & [underlined number]
Else
Result$=Result$ & [not underlined number]
Next NumLength


That would check each number in string 1 against string 2 to see if they are the same and add them to the result accordingly.

I did not write the code that underlines them or not as I don't know how your doing that.

Good luck with your project.

Brian.

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Sep 2011 21:07 Edited at: 10th Sep 2011 21:12
Thanks! I finished it. I didn't underline the matching numbers, I just put them at the end instead, which is actually better. I think that it is impossible to do what I was trying to do, to Underline one character in a string. It has a bug in it. I moved the numbers, but forgot to move the associated text with them. The txtTitle.text...



old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 11th Sep 2011 03:22 Edited at: 11th Sep 2011 03:25
NM its just VB6, gives me a head ache to try to read it.

Login to post a reply

Server time is: 2025-05-20 19:03:32
Your offset time is: 2025-05-20 19:03:32