Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

ListView won't show items on x64?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex Clark - 03 Nov 2006 16:58 GMT
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
Walter Wang [MSFT] - 06 Nov 2006 08:13 GMT
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 (wawang@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.
Alex Clark - 06 Nov 2006 13:08 GMT
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

> Hi Alex,
>
[quoted text clipped - 64 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.