[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

How can I get thin checkboxes in a VB6 ListView?

(Mike Mitchell)

7/11/2011 8:44:00 AM

The checkboxes in VB6 Treeview and ListView are really thick and ugly.

For a *TreeView* I found MathImagics' code sample at
http://www.vbforums.com/archive/index.php/t-1... to change the
ImageList using SendMessage, but I can't get the same approach to work
for ListView. I've changed the constants to match the ListView, but
the checkboxes stay thick and ugly!

Any ideas? I have *exhaustively* searched the web already!

MM
17 Answers

Jason Keats

7/11/2011 12:59:00 PM

0

MM wrote:
> The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>
> For a *TreeView* I found MathImagics' code sample at
> http://www.vbforums.com/archive/index.php/t-1... to change the
> ImageList using SendMessage, but I can't get the same approach to work
> for ListView. I've changed the constants to match the ListView, but
> the checkboxes stay thick and ugly!
>
> Any ideas? I have *exhaustively* searched the web already!
>
> MM

http://www.timosoft-so... might be worth a look.

HTH

mm

7/11/2011 1:18:00 PM

0

El 11/07/2011 05:43 a.m., MM escribió:
> The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>
> For a *TreeView* I found MathImagics' code sample at
> http://www.vbforums.com/archive/index.php/t-1... to change the
> ImageList using SendMessage, but I can't get the same approach to work
> for ListView. I've changed the constants to match the ListView, but
> the checkboxes stay thick and ugly!
>
> Any ideas? I have *exhaustively* searched the web already!
>
> MM

http://www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?lngWId=1&txtCriteria=checkboxe...

(Mike Mitchell)

7/11/2011 2:03:00 PM

0

On Mon, 11 Jul 2011 22:58:59 +1000, Jason Keats
<jkeats@melbpcDeleteThis.org.au> wrote:

>MM wrote:
>> The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>>
>> For a *TreeView* I found MathImagics' code sample at
>> http://www.vbforums.com/archive/index.php/t-1... to change the
>> ImageList using SendMessage, but I can't get the same approach to work
>> for ListView. I've changed the constants to match the ListView, but
>> the checkboxes stay thick and ugly!
>>
>> Any ideas? I have *exhaustively* searched the web already!
>>
>> MM
>
>http://www.timosoft-so... might be worth a look.
>
>HTH

I've just downloaded their ListView and tried one of the VB6 sample
projects. Changed only one property in the IDE. Got run-time error 91
when run.

MM

Abhishek

7/11/2011 6:10:00 PM

0

get this, lots of functions to add features to listview v5 using APIs
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4034&am...


--
abhishek
http://vb6zone.bl...


"MM" <kylix_is@yahoo.co.uk> wrote in message
news:jldl17pgp1eqk60dh0fhmd5es58bj31srh@4ax.com...
| The checkboxes in VB6 Treeview and ListView are really thick and ugly.
|
| For a *TreeView* I found MathImagics' code sample at
| http://www.vbforums.com/archive/index.php/t-1... to change the
| ImageList using SendMessage, but I can't get the same approach to work
| for ListView. I've changed the constants to match the ListView, but
| the checkboxes stay thick and ugly!
|
| Any ideas? I have *exhaustively* searched the web already!
|
| MM


Abhishek

7/11/2011 6:16:00 PM

0

use v5 of common controls and use xp themes, it wont be then.

"MM" <kylix_is@yahoo.co.uk> wrote in message
news:jldl17pgp1eqk60dh0fhmd5es58bj31srh@4ax.com...
| The checkboxes in VB6 Treeview and ListView are really thick and ugly.


(Mike Mitchell)

7/11/2011 7:36:00 PM

0

On Mon, 11 Jul 2011 23:45:49 +0530, "Abhishek"
<abhishek007p@hotmail.com> wrote:

>use v5 of common controls and use xp themes, it wont be then.
>
>"MM" <kylix_is@yahoo.co.uk> wrote in message
>news:jldl17pgp1eqk60dh0fhmd5es58bj31srh@4ax.com...
>| The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>

It worked! Thanks.

I also tried with the v6 ListView and set Checkboxes = True, but they
stay ugly on XP despite InitCommonControls and a manifest as per
KB309366.

MM

David Kaye

7/12/2011 6:24:00 AM

0

"Jason Keats" <jkeats@melbpcDeleteThis.org.au> wrote

>
> http://www.timosoft-so... might be worth a look.

What nice controls! I haven't used them but the screen shots look really
good. I'm looking forward to trying the date/time controls.



Dee Earley

7/12/2011 9:29:00 AM

0

On 11/07/2011 20:36, MM wrote:
> On Mon, 11 Jul 2011 23:45:49 +0530, "Abhishek"
> <abhishek007p@hotmail.com> wrote:
>
>> use v5 of common controls and use xp themes, it wont be then.
>>
>> "MM"<kylix_is@yahoo.co.uk> wrote in message
>> news:jldl17pgp1eqk60dh0fhmd5es58bj31srh@4ax.com...
>> | The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>>
>
> It worked! Thanks.
>
> I also tried with the v6 ListView and set Checkboxes = True, but they
> stay ugly on XP despite InitCommonControls and a manifest as per
> KB309366.

The V6 (of the vb common controls library) controls does not use the
standard common controls and so does not honour the manifest.
They were branched from the real common controls before XP.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

(Mike Mitchell)

7/12/2011 10:28:00 AM

0

On Tue, 12 Jul 2011 10:29:21 +0100, Deanna Earley
<dee.earley@icode.co.uk> wrote:

>On 11/07/2011 20:36, MM wrote:
>> On Mon, 11 Jul 2011 23:45:49 +0530, "Abhishek"
>> <abhishek007p@hotmail.com> wrote:
>>
>>> use v5 of common controls and use xp themes, it wont be then.
>>>
>>> "MM"<kylix_is@yahoo.co.uk> wrote in message
>>> news:jldl17pgp1eqk60dh0fhmd5es58bj31srh@4ax.com...
>>> | The checkboxes in VB6 Treeview and ListView are really thick and ugly.
>>>
>>
>> It worked! Thanks.
>>
>> I also tried with the v6 ListView and set Checkboxes = True, but they
>> stay ugly on XP despite InitCommonControls and a manifest as per
>> KB309366.
>
>The V6 (of the vb common controls library) controls does not use the
>standard common controls and so does not honour the manifest.
>They were branched from the real common controls before XP.

Yes, I have been discovering more and more about the changes that VB6
brought in. However, it IS possible to change the chunky checkboxes
in, say, the VB6 TreeView to nice, thin svelte-looking ones by using
SendMessage to change the ImageList. See MathImagics' contribution at
http://www.vbforums.com/archive/index.php/t-1... (scroll down).

In the case of the version 6 ListView, however, what I gather is that
VB immediately resets the image list back to its own image list
whenever SendMessage is attempted. Elsewhere I read about a possibilty
to subclass the ListView and swallow all 'resetting' messages, but I
haven't got too far down that road yet.

Back to the version 5 version of ListView, which does not have any
intrinsic checkbox property, what about implementing the control in a
VB6 app? Is the VB6 version better, faster? Contains more features?
Will the VB5 ListView require msvbvm50.dll? The quick test I did
yesterday evening to verify Abhishek's suggestion seemed fine. The
ListView (with thin checkboxes courtesy of the link he gave) looked
and behaved exactly the same as any other ListView.

The only other reference I found to replacing the thick chunky
checkboxes was on a Delphi page where someone has published code to
repaint the checkbox with one's own graphic in the
OnAdvancedCustomDrawItem event.

MM

Dee Earley

7/12/2011 11:11:00 AM

0

On 12/07/2011 11:27, MM wrote:
> Back to the version 5 version of ListView, which does not have any
> intrinsic checkbox property, what about implementing the control in a
> VB6 app? Is the VB6 version better, faster? Contains more features?

The V5 controls work just as well in VB6 as the V6 controls.
They just lack the properties, most of which can be worked around by
calling the native methods, which, as it's a real common control,
support all the new features in Windows since.

> Will the VB5 ListView require msvbvm50.dll?

No, the VB5 runtime is only needed for projects written in VB5.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)