Windows Develop Bookmark and Share   
 index > Windows Forms General > Bug
 

Bug

Hi,
i have got a error when i double click on ListView of .Net control,
in windows form.can any one tell me its solution.
at System.Windows.Forms.ListViewItem.set_Checked(Boolean value)
at System.Windows.Forms.ListView.WmNmDblClick(Message& m)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Amit m  Friday, February 29, 2008 1:12 PM
Hi,

Can you tell what error you received?
Mykhaylo Terentyak  Friday, February 29, 2008 1:20 PM

Do you have event handlers attached to Click, DoubleClick or CheckChanged of ListView, If yes, please post your code,

Best Regards,

Rizwan a.k.a RizwanSharp

RizwanSharp  Friday, February 29, 2008 2:42 PM
You probably have event handler for double click and some logic in that method throws exception
so place breakpoint on that mehod and see what is going on,

greet
Dragoslav Zaric  Friday, February 29, 2008 3:01 PM

yes i have CheckChanged and selectionchangedevent on ListView.bot not click and doubleclick event attached.

and i am checking e.checked

if yes then i am removing item from list and refilling the list.

Amit m  Saturday, March 01, 2008 5:51 AM
i got object reference is null,error.

Amit m  Saturday, March 01, 2008 5:52 AM

Can you paste code that you have in those twoevent handlers (methods)

greet

Dragoslav Zaric  Saturday, March 01, 2008 12:05 PM
Check your "C:\WINDOWS\Microsoft.NET\Framework" .. Look for a 3.0 and / or 3.5 folder !!

If you don't have this folder download "Microsoft .net framework 3.5" and install it !!!

This is NOT a bullet proof way of fixing the problem !!! but i have just been investigating the exact same error, and found that the framework 3.0 have a fix that make my codeing style posible for the ListView control ...
I won't go in details about the error as it is something to do with the windows messages to the control ...

If you must get the code to work with framework 2.0 then you can overwrite the WndProc function (search the web fore details) ..
And just disable the double click message code ... (or run some code) ...
But only do this if you know what you are dooing !!!

bud start with getting the 3.5 framework ... and remenber, there is a problem with the old 3.5 installer wher you need to unregister and re register c:\windows\system32\msxml3.dll

hope this post may help someone !!! ...
Sunstar  Wednesday, May 27, 2009 3:52 PM

You can use google to search for other answers

Custom Search

More Threads

• Find width and length of an image w/0 loading it
• How to select Multiple rows in Datagrid View In windows application
• TreeView's Scrollbar or Position
• Centering called forms
• Modal form closes when a Button control on the form is clicked...
• How to use backgroundworkercompoentn with progressbar?
• change button text after click
• save Win form as JPEG format.
• loading colored cursor image
• How can I format a richTextBox?