Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TreeView DragIcon Huge

Posted on 2004-08-07
4
Medium Priority
?
246 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…
Suggested Courses

636 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