Welcome to Dream.In.Code
Become a VB Expert!

Join 149,946 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,396 people online right now. Registration is fast and FREE... Join Now!




false character displaying & vb6,vb2008 listboxes

 
Reply to this topicStart new topic

false character displaying & vb6,vb2008 listboxes

benpap
16 Dec, 2007 - 08:54 AM
Post #1

New D.I.C Head
Group Icon

Joined: 24 Nov, 2007
Posts: 44


Dream Kudos: 100
My Contributions
Hello there, I am in need of some help.

In VB6, when i use Greek chalacters (ex. α,β,γ) the characters are not displayed correctly like so: Þ ó ï í ô å é

How can I solve this problem?


I alsto I want to ask about the list box in VB 2008. In VB6 to add a text I use this code:
CODE

Listbox.additem 'and then what i want to add

The problem is in VB 2008 it doesnt work. Could you tell be how to add a text into a listbox in VB2008? THX!
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: False Character Displaying & Vb6,vb2008 Listboxes
16 Dec, 2007 - 10:23 AM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,655



Thanked: 313 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Unicode support in VB6 is very limited. It was designed back when software wasn't truly internationalized and thus has problems rendering some character sets. Much of the IDE itself is ANSI only include menus, the property window etc. However, there are ways to get to Unicode with VB6 but it isn't always an easy route.

Some suggest wrapping controls in custom controls which support unicode, others have recommended books on designing with internationalization in mind. One such book is listed below...

Internationalization with Visual Basic

If you search on the net you can also find great websites that go into depth on the subject and can provide useful tips and code segments to demonstrate the process.

As for adding items to a listbox in 2008, you have to change the syntax a little from the old VB6 version

CODE

Listbox.Items.Add("text to add")


It was changed to this because now everything in .NET is an object so the listbox has a structure known as a collection called "items" for which each item is an object. You can add to the collection by calling the collection's add method and providing text or even an object. You can also use methods like count, remove etc.

Hopefully these answer your questions to your satisfaction. Enjoy! smile.gif
User is offlineProfile CardPM
+Quote Post

benpap
RE: False Character Displaying & Vb6,vb2008 Listboxes
17 Dec, 2007 - 09:06 AM
Post #3

New D.I.C Head
Group Icon

Joined: 24 Nov, 2007
Posts: 44


Dream Kudos: 100
My Contributions
Yes solved all my questions. Thanks a lot! icon_up.gif smile.gif It is always good to learn something I didn't know! biggrin.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 05:10PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month