Tow question about image control.

ferasferas
01-22-2005, 09:35 AM
Hi for every one :)
I've tow question about the Image control as the following:

1. How can I make a transperant colour to the picture, that image control have it, in it's picture property. (ex. the pic of rounded button, so I didn't want to show just the rounded button)

2. I want to use the image control as a button, so I put a button pic in it's picture property. But I want that button to have deferent pic according to the mouse postion (MouseOver) and state (Mousedown) and (MouseUp).

Now the problem, as you know I use the MouseMove property to load a suitable pic to that state.

Then I use the MouseMove property to the form to load the ordinary state to that button, also I put the MouseMove property to all controls on the form to make the image control show the ordinary state pic.

And I find that so difficult especially if I have 10 or 20 button.

so is there away to put a pic to the image control when MouseMove and put another pic to it when the Mouse isn't on it ( I mean whenever it was, on the form or on any control on that form )

Gruff
01-22-2005, 10:54 PM
Sounds like you are talking about a hover button.
Best thing to do if you want to use the image control is to use a control array of images and an imagelist control to hold your button pictures. It is much faster than loading your pictures from disk. If you want transparent areas in your button then use a gif editor to create your images. It has a transparent Color.

On the other hand Verphix has a good Idea in that if your create a generic Button control you will only need to manage all the many fussy steps for just one special button. There after you just use if like any other control.

~T

~T

ferasferas
01-23-2005, 06:18 AM
Sounds like you are talking about a hover button.
Best thing to do if you want to use the image control is to use a control array of images and an imagelist control to hold your button pictures. It is much faster than loading your pictures from disk. If you want transparent areas in your button then use a gif editor to create your images. It has a transparent Color.

On the other hand Verphix has a good Idea in that if your create a generic Button control you will only need to manage all the many fussy steps for just one special button. There after you just use if like any other control.

~T

~T

First of all thank you gentleman, so I've actually tow ways now:
1. I shuld learn how to build a UserControl, which I donn't know.
2. I've not any GIF aditor to make a coluor transperant.

so, I thihk I need a great help... :D

Verphix
01-23-2005, 07:16 AM
Don't you have photoshop? If not, take a look at the free image editors here:
http://www.snapfiles.com/freeware/gmm/fwgraphicedit.html

ferasferas
01-25-2005, 05:22 PM
Although I have a PhotoImpact v.10 but I couldn't find out how to make a specific colour in the pic look transperant.

Verphix
01-26-2005, 12:40 AM
You would cut out the parts which you want transparent, either by using a pen, a lasso tool, etc... and then delete it as you would in any paint program normally, and you have to make sure that the first empty white layer that you have should be deleted, or it will just be white, and then save as a GIF file. << Photoshop, others might be very similar ;)

IPuffer
01-26-2005, 03:03 AM
How I can display the pixels from TIFF on the PictureBox Control? Visual Basic doesn't support TIFFs on the controls. One way is conversion to GIF or BMP. How can I perform this conversion in VB?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum