Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

TreeView DragIcon Huge

Posted on 2004-08-07
4
229 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 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