Home All Groups Group Topic Archive Search About

ListView won't show items on x64?

Author
3 Nov 2006 3:58 PM
Alex Clark
Hi All,

I've found that the ListView control won't display items when my program is
running in x64 mode.  I've tried this on both a Pentium D running XP Pro x64
edition and Windows Server 2003 R2 x64 on a Core 2 Duo.  Same results on
both.

If I compile for the specific x86 architecture, the problem disappears.  In
x64 mode the ListView items are obviously still there because my scroll bars
are there, and if any of them have a background hilite that's visible too -
it's just the text that's disappeared, almost as though it's been painted in
a transparent colour.

Has anybody else had this issue?

Thanks,
Alex Clark

Author
6 Nov 2006 8:13 AM
Walter Wang [MSFT]
Hi Alex,

I've tried following code on Windows Server 2003 R2 x64 and didn't found
the issue as you described:

using System;
using System.Windows.Forms;

class Class1 : Form
{
    [STAThread]
    static void Main()
    {
        Application.Run(new Class1());
    }

    public Class1()
    {
        ListView listView1 = new ListView();
        listView1.Dock = DockStyle.Fill;
        listView1.View = View.Details;
        listView1.Columns.Add("Column1");
        listView1.Columns.Add("Column2");

        for (int i = 0; i < 1000; i++)
        {
            ListViewItem lvwItem = new ListViewItem("Hello");
            lvwItem.SubItems.Add("World");
            listView1.Items.Add(lvwItem);
        }
        this.Controls.Add(listView1);
    }
}


I compiled it using:

csc.exe /t:winexe /platform:x64 Class1.cs


Would you please try it out and tell me the result? If it's ok on your
side, could you please send me a smaller reproducible project? Thanks.

Sincerely,
Walter Wang (waw***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
6 Nov 2006 1:08 PM
Alex Clark
Hi Walter,

Not to worry, I think I've found this issue - I didn't realise but I was
making some unusual API calls against the ListView in my project which I
suspect I haven't adapted properly to work on x64.  The regular ListView
works just fine, which is what I'll "downgrade" to until I've sorted the
issue.

Many thanks,
Alex Clark




Show quote
"Walter Wang [MSFT]" <waw***@online.microsoft.com> wrote in message
news:z8IswtXAHHA.5920@TK2MSFTNGXA01.phx.gbl...
> Hi Alex,
>
> I've tried following code on Windows Server 2003 R2 x64 and didn't found
> the issue as you described:
>
> using System;
> using System.Windows.Forms;
>
> class Class1 : Form
> {
>    [STAThread]
>    static void Main()
>    {
>        Application.Run(new Class1());
>    }
>
>    public Class1()
>    {
>        ListView listView1 = new ListView();
>        listView1.Dock = DockStyle.Fill;
>        listView1.View = View.Details;
>        listView1.Columns.Add("Column1");
>        listView1.Columns.Add("Column2");
>
>        for (int i = 0; i < 1000; i++)
>        {
>            ListViewItem lvwItem = new ListViewItem("Hello");
>            lvwItem.SubItems.Add("World");
>            listView1.Items.Add(lvwItem);
>        }
>        this.Controls.Add(listView1);
>    }
> }
>
>
> I compiled it using:
>
> csc.exe /t:winexe /platform:x64 Class1.cs
>
>
> Would you please try it out and tell me the result? If it's ok on your
> side, could you please send me a smaller reproducible project? Thanks.
>
> Sincerely,
> Walter Wang (waw***@online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. If you are using Outlook Express, please make sure you clear the
> check box "Tools/Options/Read: Get 300 headers at a time" to see your
> reply
> promptly.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>

AddThis Social Bookmark Button