Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB.NET Toolbar

Posted on 2004-08-22
7
Medium Priority
?
887 Views
Last Modified: 2008-03-06
Hi everyone.
I've upgraded a vb6 application to vb.NET
The quality of the images on the older toolbar & older imageList are great but if I create a new imageList and a New toolBar, the quality of the images on the new controls are lower !?
You can see the difference at:
http://users.domaindlx.com/kourosh/toolbar.jpg
I've loaded the same bitmaps...with the highest possible color depth (32dpi)

Also, do you know if I can put a control (like a progressBar or listBox) on a toolBar?
Feel free to comment.
0
Comment
Question by:kouroshparsa
[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
  • 4
  • 3
7 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 11868430
Hello

  fhange the colorDepth property of ImageList to Depth24Bit or Depth32Bit

0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 11868442
>>fhange
sorry I meant Change
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 300 total points
ID: 11868835
I forgot the second part

you can add any control to tool bar by setting the Parent Property to the toolbar or add the control to Controls collection of toolbar as following:

        ToolBar1.Controls.Add(ComboBox1)
        ProgressBar1.Parent = ToolBar1
        ComboBox1.Top = 0
        ProgressBar1.Top = 0

HTH
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:kouroshparsa
ID: 11877792
Hi.
About the code above, do you know the difference between ToolBar1.Controls.Add(ProgressBar1)
and ProgressBar1.Parent = ToolBar1       ?

About the quality problem:
I made a new sample for myself and before adding images to the imageList, I set the colorDepth, Now it has its correct quality, but it causes another problem:
As far as I know, the Transparent color of the default Microsoft bitmaps (images of printer, cut, copty...) is Silver.
Now it does not work.
[keep in mind that imageList has a property TransparentColor and also the toolbar has that property in imageList property]
When I fix the Transparent color, the quality of the image noticably decreases!!!?

Please try to set the tranparent property of the imageList to silver before loading the images, otherwise it is not going to work at all. Maybe I'm wrong about the color "Silver" but it works in vb6 as Silver!
0
 
LVL 2

Author Comment

by:kouroshparsa
ID: 11878121
I figured that the problem was only with 3 images, so I edited the bitmaps...and now it looks much better.(The quality problem is solved)
I suggest anyone who may face this problem to edit the bitmaps or icons(if it does not look right) and choose Silver TransparentColor (for the Microsoft images) + ColorDepth before loading the images.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 11878422
Hello kouroshparsa

>>ToolBar1.Controls.Add()
it's will add the control into the Toolbar controls collection and will change the Parent to ToolBar

>>ProgressBar1.Parent
will change the parent of ProgressBar to ToolBar, and ProgressBar will added to collection controls too

I gave you the two, for doing the same thing, but I prefer to use ToolBar1.Controls.Add because it's more clear

>>Please try to set the tranparent property of the imageList to silver
you can use any color not onll silver, I have Icons with background Magenta, so I just choose the transparent color for the ImageList

HTH

Regards,
Mohammed
0
 
LVL 2

Author Comment

by:kouroshparsa
ID: 11889136
Thanks for commenting on "the difference between add & parent".
I sure knew that I can choose any transparent color...I was talking about the common bitmaps of Microsoft with Silver transparent color at "\common\graphics\bitmaps"...What surprised me was that the same bitmap in vb6 looks different on vb.NET.
Well, as I said I fixed the problem by editing it.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

730 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