04 May 2009 @ 11:22 AM 

Giovanni Montrone wrote in his Code Project article that the best way to avoid listview flicking is forcing it to use DoubleBuffer. He provides a new listview control that inherits from the classic one and adds a new method called SetExStyles() which allows setting the extended styles of the listview.
But I found a comment from Gabriel Szabo explaining how to have the same result without sub classing any control, but using Reflection :

PropertyInfo aProp = typeof(ListView).GetProperty("DoubleBuffered",
BindingFlags.NonPublic | BindingFlags.Instance);
aProp.SetValue(lvwControl, true, null);

(when lvwControl is the name of your listview control)

Many thanks Gabriel !!

Tags Categories: C#, Dev Posted By: Pierre-Alain Galtier
Last Edit: 08 Nov 2012 @ 12 10 PM

EmailPermalinkComments Off

 14 Apr 2009 @ 2:32 PM 

Recently, I had to sort items in my listview. Ok, I heard you, “nothing difficult doing that”. But I also had to group them as Outlook does. I mean “according to the date, today items, yesterday items, tomorrow items, next month items,…” More »

Tags Categories: C# Posted By: Pierre-Alain Galtier
Last Edit: 08 Nov 2012 @ 01 24 PM

EmailPermalinkComments Off

Few days ago I was writting an application querying DNS for MX record. Trying to optimize it, I realize I could use the DNS specified for the local computer instead of using a hard-coded one. Then I wonder how to get this DNS server list and, most important, how to keep it up-to-date. Because changing of wi-fi hotspot makes my IP settings (IP Address, Subnet Mask, and… DNS servers) change. More »

Tags Categories: C# Posted By: Pierre-Alain Galtier
Last Edit: 08 Nov 2012 @ 05 41 PM

EmailPermalinkComments Off

 09 Nov 2008 @ 7:06 PM 

Debugging a windows service might be a little bit hard. Because each change in your code implies to uninstall/reinstall the service. A way to avoid this issue is to launch the service from the command line. Then you will be able to add breakpoints in your source, even in the OnStart method… More »

Tags Categories: C#, Visual Basic (.NET) Posted By: Pierre-Alain Galtier
Last Edit: 08 Nov 2012 @ 01 24 PM

EmailPermalinkComments Off




\/ More Options ...
Change Theme...
  • Users » 1
  • Posts/Pages » 5
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight