1

I wrote a .net-DLL (vb.net), which includes a Windows-Form. The Windows-Form includes a ListView. The ListView are working in the view "details" and have some ListViewGroups.

When I implement the DLL with the Windows-Form and the ListView in one of my .net-applications, all is okay,because i can switch on the VisualStyle. So I see the ListViewGroups in the ListView.

But now I want to implement the .net-DLL in a "other project" (don't ask), where i have no possibility to switch on the visualStyle. (I think the visualstyle is switched off in the "other project"). I cann't change the "other project".

So, my question is: Can i do something with the .net-DLL or the ListView, that the ListViewGroups are visible or that they don't recordnize that the visualstyle is disabled? Maybe something overwrite or overload?

Thanks.

Cit
  • 113
  • 1
  • 10
  • 1
    I think you are out of luck. Groups rely on Application.EnableVisualStyles and that must be invoked before any forms or controls are created. – Ňɏssa Pøngjǣrdenlarp Oct 24 '14 at 13:13
  • With visual styles turned off, the process will load a legacy version of comctl32.dll. Version 5 instead of version 6. Compatible with programs written for Windows 98 or 2000. That ends any attempt to load the modern version. Grouping wasn't supported back then, you'll have to give up on the feature. – Hans Passant Oct 24 '14 at 13:36
  • 1
    And something like this: http://stackoverflow.com/questions/10103609/windows-theme-affecting-listview-header or http://msdn.microsoft.com/en-us/library/windows/desktop/bb759827%28v=vs.85%29.aspx – Cit Oct 24 '14 at 13:51
  • No, that of course doesn't help with having the wrong version of comctl32.dll loaded. – Hans Passant Oct 24 '14 at 14:21
  • Okay, I believe you. Is there another control, like the listview with groups, which have without "visualstyles" the same look? Can you something recommended? Otherwise I would try a treeview. – Cit Oct 27 '14 at 06:38

0 Answers0