dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: VBA Listview does not show correct characters

  1. #1
    Join Date
    Apr 2010
    Posts
    5

    VBA Listview does not show correct characters

    Several forms in our access product (file format Access 2000), a frontend to an SQL Server database, containing a MSComctlLib.ListViewCtrl.2.

    We need to display characters like C caron in our lists. They are stored in the database tables, I can prove that in both SQL Server (Management Studio) and in the table view of the linked tables in Access.

    The font set in the listview properties is "Arial" which is a Unicode font in every Windows version we are running our software on. SQL Server collation and Locale (substitution font for non-Unicode programs / program parts) are set to the target language which fixed every other character issue we had with this ... So I can't imagine which settings to check anymore or what to do to get around these problems.

    Regards,

    mupan

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    Is this problem only in the ListView or in other components as well (for example a TextBox and a Label)
    Remember that even if the Arial font is Unicode, the right CharSet (character set) font property needs to be set. I do not know about the C caron characters, sorry I can't help you with that.
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Apr 2010
    Posts
    5
    Hello mstraf,

    labels and textboxes and everything else are okay. It's only the listview that makes problems.

    What do you mean by CharSet, where can I find this property?

    C caron or C hatschek: čČ

    Thank you so far.

    mupan

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    The problem is the ListView control itself. It does not support unicode.

    You would need to find a third party listview for that functionality. Years ago I remember seeing a listview control on VBAccellertor that did support unicode. You might try giving that site a search and see what you can come up with.

  5. #5
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    ListView does not support unicode "internally" (like all other VB6 controls), but if you set the right CharSet font property it is able to display any type of font
    I use for years a code taken from this article, and it works with any languages, for any component (including the ListView, using the property .Font.Charset)
    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  6. #6
    Join Date
    Apr 2010
    Posts
    5
    Thank you mstraf, that was it. I'm glad I don't have to implement a listview alternative.

Similar Threads

  1. Replies: 2
    Last Post: 05-20-2010, 01:58 AM
  2. append & split & spread characters
    By oscarjaime in forum .NET
    Replies: 10
    Last Post: 03-06-2008, 11:48 AM
  3. Grouping listView items, printing
    By chrisliando in forum .NET
    Replies: 0
    Last Post: 12-10-2007, 08:38 PM
  4. Need Help with VBA for Excel
    By Bob in forum VB Classic
    Replies: 0
    Last Post: 03-14-2002, 03:27 PM
  5. Listview boxes
    By Kenneth in forum VB Classic
    Replies: 0
    Last Post: 04-24-2001, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center