Solved

TreeView DragIcon Huge

Posted on 2004-08-07
4
235 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
[X]
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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

696 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