Important alert: (current site time 5/20/2013 1:10:38 AM EDT)
 

winzip icon

API-ucTreeView 1.2

Email
Submitted on: 10/27/2004 9:56:16 AM
By: Carles P.V. 
Level: Intermediate
User Rating: By 29 Users
Compatibility: VB 6.0
Views: 11868
 
     Almost single-module TreeView user-control (thanks, Paul). // Zip 32Kb.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 53 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

10/27/2004 10:07:44 AMenmity

long long long long long long long long long long long long long long long long long long waiting........ now excellent;)
(If this comment was disrespectful, please report it.)

 
10/27/2004 11:15:07 AMPhantom Man

Awesome. Carles.

Hilited Should Be 'Highlighted'
(If this comment was disrespectful, please report it.)

 
10/27/2004 12:20:23 PMenmity

I believe it is a short naming and, for the most important reason: the space in the test form.
(If this comment was disrespectful, please report it.)

 
10/27/2004 12:41:18 PMCarles P.V.

Thank you Gary. But, what is awesome is the work you've done: entirely design-control-draw a treeview. In my case, most of work is done by API :-) And OK for correct spelling of 'hilite'. Yes, as enmity says, is only for short naming. I've seen this 'variation' more than once... What I don't know is how many incorrect spelling I've done in these comment lines, including this last sentence.
(If this comment was disrespectful, please report it.)

 
10/27/2004 12:49:30 PMCarles P.V.

Forgot to mention... If someone knows how to implement 'BackImage' without affecting icons original transparency, please: let me know.
(If this comment was disrespectful, please report it.)

 
10/27/2004 2:39:45 PMEd Porter

Incredible! When will you start working on Drag/Drop functionality?

5 Stars

Sincerely
Ed Porter
(If this comment was disrespectful, please report it.)

 
10/28/2004 4:26:25 AMLight Templer

Hi Carles,

another very fine part of 'unVisual Basic' ;))) - my ***** for!

There's a lot to learn from (e.g. the Font handling with the event and named parameter on API calls for better reading are two I will use).

One note: As I told Paul already: There is a strange error (GPF) in the subclassing part which occours on Win98 when leaving the program (IDE and compiled) . Paul will update his code next days. The fix is simple: Change the length of asm code to 202
Private Const CODE_LEN As Long = 202
to fully fix it. Else the GlobalFree() does something strange... (Yes, the asm code IS 200 bytes long, but who knows whats happing behind all of this magic called an OS ;)) ) I got the effect on an uc of mine and discovered it in Pauls fine last demo (show all WM_xxx ) , too. Ok, Win98 isn't very popular anymore, but changing a single bit just to have it all isn't a problem ;) .

Whats your next project? Another uc?

Kind regards
LiTe
(If this comment was disrespectful, please report it.)

 
10/28/2004 6:10:15 AMenmity

Oh yeah, maybe ucGrid!
(If this comment was disrespectful, please report it.)

 
10/28/2004 9:51:54 AM

i love these user control's. Because carles alway's write's optimized and structured code we will soon have a perfect replacement set of VB control's to work with!

Keep up the amazing work Carles.
(If this comment was disrespectful, please report it.)

 
10/28/2004 5:47:30 PMFred.cpp

As Usual Awesome work. Great and profesional code. 5 balls, more If I could.
(If this comment was disrespectful, please report it.)

 
11/2/2004 6:17:23 PM

WOW. exactly what iam looking for, .ocx independent treeview control. i only which the example form was a tiny bit easier for n00bs like me.
(If this comment was disrespectful, please report it.)

 
1/28/2007 11:17:49 PMTomás

looks great. ill check it
(If this comment was disrespectful, please report it.)

 
4/13/2008 4:37:37 AMcdrcools

Great code, the fact that it only requires 1 Module is exellent. If possible could you please tell me how the Treelines color can be changed. 5* From me.
(If this comment was disrespectful, please report it.)

 
7/1/2008 5:37:51 AMalvinwong

I found after I initalized the control, VB6 will be crashed by pressing the [End] button.
(If this comment was disrespectful, please report it.)

 
7/2/2008 11:02:36 PMalvinwong

How can I make "one-click expand" and collasp only with "minus" button like the xp Explorer?
Also "track select" without "hand" cursor?
Please teach me...
(If this comment was disrespectful, please report it.)

 
7/9/2008 1:59:28 AMalvinwong

I've problem adding icons.
I use:
treeFolders.AddIcon picIconBuffer.Image
But it only return -1 and it seems to be useless.
Can anyone tell me why?
(If this comment was disrespectful, please report it.)

 
12/31/2008 10:58:08 PMKojiro Iosha

Do you write this line, don't you ?
.InitializeImageList
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.