Modify existing VB6 Treeview control #3 (enhancements)

Este projeto foi finalizado com sucesso por vks75 para $88 USD em 10 dias.

Obtenha orçamentos gratuitos para um projeto como este
$30 - $250 USD
Completo em
10 dias
Total de Ofertas
Descrição do Projeto

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.

Completo por:
Habilidades Necessárias

Afim de ganhar algum dinheiro?

  • Defina seu orçamento e o prazo de entrega
  • Sublinhe sua proposta
  • Receba pelo seu trabalho

Contratar freelancers que também ofereça neste projeto

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online