Solved

TreeView DragIcon Huge

Posted on 2004-08-07
4
222 Views
Last Modified: 2008-02-01
In VB project using TreeView control and imlTreeViewIcons ImageList, I do

tvTreeView.DragIcon = imlTreeViewIcons.ListImages(5).ExtractIcon

in the MouseMove event. The icon 5 in the ImageList is size 16, colors 16. When dragging, the dragicon appears really HUGE.
How can I have it displayed at its normal size (16x16 pixels)?

(using CreateDragImage is not really an option because I need to change the DragIcon repeatedly in DragOver)

0
Comment
Question by:campinas
  • 3
4 Comments
 
LVL 22

Accepted Solution

by:
DarkoLord earned 500 total points
ID: 11745806
I have never found a proper solution to this but there are two others that may be of help:

- draw 16x16 images in a 32x32 bitmap and make the outer edge transparent
- create a separate 32x32 imagelist and populate it with the same icons.. then set the DragIcon property to the icon from 32x32 imagelist

good luck!
Darko
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11745816
Hi again,
I think I found the right one on the Brad Martinez's site:

http://www.mvps.org/btmtz/treeview/tvdragdrop.zip

Darko
0
 

Author Comment

by:campinas
ID: 11745960
Oh, that's great! Thank you so very much. Your answer is worth 5000 points,  not 500.
My best regards to you.
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11745963
You're welcome!

Darko
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now