Em Andamento

Modify existing VB6 Treeview control #3 (enhancements)

A) Icons:


Now we have PNG data loaded from file, works very good.

Please see attached another method which I use in my main program ([url removed, login to view]).

I can use these picture in the tree, but the transparency goes wrong.

Please adjust the tree to make use of this unaltered imagelist.

You can edit the *.res file easily with XN Resource Editor if necessary.


I want a simplified logical structure.

There is no need for an 'expanded' image, this is redundant info, the tree itself shows by +- if a node is expanded or not.

When adding a node I want only ONE picture name to give, e.g. "MyNode".

If a node is disabled, in the enable/disable code, the picture shall automatically set to "MyNode_disabled" and back to "MyNode".

Of course the *.disabled picture must be there, if not I want an error message.


Click on picture to en/disable is too fuzzy, must only work on picture not on node text.

Other, better solution:

Private Sub TreeView_NodeClick(ByVal Node As [url removed, login to view])



'[url removed, login to view] "NodeClick: " & [url removed, login to view]


GetCursorPos .PT

ScreenToClient [url removed, login to view], .PT

SendMessage [url removed, login to view], TVM_HITTEST, 0, ByVal VarPtr(TVHTI)


[url removed, login to view] "on Icon: " & [url removed, login to view]


[url removed, login to view] "not on Icon: " & [url removed, login to view]

End If

End With

End Sub


B) Appearance


DragIcon, created on the fly from the dragged nodes.

I know there is a ready-made function for this, CreateDragImage?, I don't know exactly.

While dragging there must be a good looking icon/picture/whatever.

Perhaps the node icon is good enough?

Or the label.

Windows Explorer uses an icon, this seems to be the most pleasing method.

In any case, the new drag icon must not be distorted, it must be a nice looking picture.


Flickerproblem Win8 must be solved

I still got no solution from someone else...

An idea:

The flicker is gone when I decrease the rectangle size after it was larger before.

It may be a memory allocation problem.

Perhaps a dirty dummy procedure could help.

Immediately after mouse down, we create a selection rectangle as large as possible.

And after that we continue as usual.

In my opinion the flicker should be gone...

I know you must have Win8 to test with.

What about the test version?

It runs 90 days.


C) Storage


XML data is now language dependent, e.g. 'True' is stored as 'Wahr' on a German OS.

This must be all in english or just numbers (-1 for true, 0 for false), no matter what the OS language is.

Regardless which OS or language is used, the XML must be in one certain language (english).

To make sure it can be stored and read under all circumstances.


XML load fails to restore the correct CR LF combination.

You can see this clearly when you commit a text to a node, save the tree and restore it.

As far as I can see it is stored right, load makes this error.

I fixed it myself:



If [url removed, login to view] <> "" Then

[url removed, login to view] = [url removed, login to view]

End If

If [url removed, login to view] <> "" Then

[url removed, login to view] = [url removed, login to view]

End If

m = [url removed, login to view]

m = Replace$(m, vbLf, vbCrLf)

[url removed, login to view] = m

Maybe you know a better solution?


D) Questions


Please give me advice how to easily get the list of nodes.

I want to get a list which contains label, key, address of node, order in tree (which level), just all data from the nodes.

The goal is to search for a node by label or key, then insert a node refered by the address.


Let me select a node by address.

1) and 2) are best answered by a code snippet in the test app.

As always, I'm open for discussion in detail questions.

Habilidades: Visual Basic

Ver mais: vb6 treeview, what is tree in data structure, what is tree data structure, what is a tree node, what is a tree in data structure, what is a tree data structure, vb6 test questions, uses of tree data structure, uses of data structure, use of tree data structure, tree program in data structure, tree of data structure, tree insert, tree in data structure, tree data structure in c, tree data structure c, search in tree, search enhancements, png icon set, order of tree in data structure, order of tree, n-tree data structure, n tree data structure, node of a tree, node in tree

Acerca do Empregador:
( 24 comentários ) Germany

ID do Projeto: #5123640

Premiar a:


Hello Gregor, I have placed my bid as discussed, only thing i need is some time to complete, so i have given 10 days for the work. Regards Karthik.

$88 USD em 10 dias
(5 Avaliações)

3 freelancers estão ofertando em média $172 para este trabalho


Dear Sir, I have read the job description of yours and ready to start work with you i am having 8+ experience in Visual Basic, asp.net and also with its related frame work. I am very interested to work on this p Mais

$222 USD in 6 dias
(0 Comentários)

Hi, I take this opportunity to introduce myself. My name is Jeni and I am the BusinessDevelopment Executive of annaijobs. Understanding: 1. To Modify existing VB6 Treeview control #3 (enhancements) area. The pro Mais

$206 USD in 10 dias
(0 Comentários)