Print Page | Close Window

Imagemanager and listview

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=9557
Printed Date: 03 July 2024 at 12:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Imagemanager and listview
Posted By: foleypt
Subject: Imagemanager and listview
Date Posted: 11 February 2008 at 1:06pm
Hi All

I am a new codejock user and am integrating the codejock commandbars into a large existing VB app.

I need some help using the Imagemanager and listview and treeview controls.

I wish to use the Imagemanager  because of it's support for alpha transparancy and it's ease in switching between difference sizes for icons.

Many of same icons I use for the menus and tool bars are also used in treeview and listview controls (currently standard VB6 controls)

I would like to ditch my vb imagelist controls.

Is there any way to reference Imagemanager  from listview controls?

Would this be possible if I switched to the codejock control suit versions?

Does there exist any example code of Imagemanager  and listview  or treeview controls working together in vb6?

Thanking in advance, codejock was exactly what I was looking for (in fact wish I had found it before I had spend some months trying to work with the valiant but limited vbaccelarator controls)





Replies:
Posted By: Oleg
Date Posted: 12 February 2008 at 4:53am
Hello,
 
Yes, our Version of TreeView and ListView supports our ImageManager. See SuiteControls  sample from last release.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: foleypt
Date Posted: 12 February 2008 at 11:37am
Thanks Oleg

I'm going to post here for anyone interested  some tips on how to switch a project from  VB6 standard listviews to Codejock ones

I haven't done a treeview control yet, but the process will be the same..I imagine that most of the below can be done as a batch convert with a good text editor

Am I right in saying that swapping over to the other codejock controls equivalents is as simple as the above procedure and that there are functional and code equivalents  for each of the vb6 controls in MSCOMCTL.OCX?

In VB6 add xtreme suite controls activex control as a component to the project

save and quit the project

back up your source files

edit using a text editor for each .frm file that has a vb6 listview add line

after line "VERSION 5.00"
and before "begin vb.form"

add
Object = "{A8E5842E-102B-4289-9D57-3B3F5B5E15D3}#11.2#0"; "Codejock.Controls.v11.2.2.ocx"

if the form has no other of the below

tabstrip toolbar statusbar progressbar treeview listview imagelist slider

then you can remove

Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"

Do a copy replace, search for

Begin MSComctlLib.ListView

replace with

Begin XtremeSuiteControls.ListView

Do a copy replace, search for

MSComctlLib.ListItem

replace with

XtremeSuiteControls.ListViewItem

Do a copy replace, search for

as listitem

replace with

as ListViewItem

Save the .frm files, open the project

all calls to ListItems.Add will have to be modified, there might be an extraparameter for smallicons consts

you will have to add imagemanagers and fill them giving them numeric consts to identify the icons (vb listviews used alphanumeric consts)

ListItems.icons becomes a set and references the icons collection of the imagemanager

ListItems.SmallIcons goes away

set a value for lvMenuItems.IconSize = and hey presto you are now using codejock listviews





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net