Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Button image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben - 29 Jun 2006 12:29 GMT
Hi,

I have a round image and have set it to be the button's image. I also set
the backcolor as Transparent. When I run the form, the image looks good but
it has a square box aound that is not transparent.

How can I get the square box to be transparent?

Thanks for your help

Ben
Pritcham - 29 Jun 2006 13:15 GMT
Hi

Is there a border/frame property for the image (not at my development
machine at the moment so can't look) - this may be what's causing a
visible border.

HTH
Martin
> Hi,
>
[quoted text clipped - 7 lines]
>
> Ben
Ben - 29 Jun 2006 22:52 GMT
Hi Martin,

Under FlatAppearance there is a BorderSize, I set it to zero but no luck.

Thanks for your help

Ben

> Hi
>
[quoted text clipped - 15 lines]
> >
> > Ben
Rimmer - 30 Jun 2006 02:03 GMT
Hi Ben,

what type of image are you working with gif/jpg/bmp ?
has it been created with a proper transparent background (alpha
channel)?

Anthoney

> Hi Martin,
>
[quoted text clipped - 23 lines]
> > >
> > > Ben
Ben - 01 Jul 2006 00:53 GMT
Hi Anthoney

I have tried jpg, gif, and png. They do have a transparent background.

Thanks

Ben

> Hi Ben,
>
[quoted text clipped - 31 lines]
> > > >
> > > > Ben
Rimmer - 03 Jul 2006 00:32 GMT
Hi Ben,

well the jpg will never work as it does not support transparency.
but the png should be all good (and the best quality option as it
supports partial transparency).

I may have not understood your problem, there are two different options
you may be looking to achieve. Can you tell me which?
a) You want to show an image that is round as the complete button, with
no button square border or text.
or
b) You want to show a button with a round image contained inside it.
The button still has it's square shape.

If a is your desired option, I suggest using a picture box (background
set to transparent) and capturing the click of the picture box the same
as the click of a button. Also set the cursor for the picture box to
the 'hand' as happens for a button.

if b, it should be working without a problem.

Does this help?

Anthoney
www.nowpromote.com.au

> Hi Anthoney
>
[quoted text clipped - 39 lines]
> > > > >
> > > > > Ben
FUnky - 30 Jun 2006 13:01 GMT
Try the following for the button :
BackColor = Transparent
FlatAppearance.BorderColor = Control
FlatAppearance.BorderSize = 0
FlatStyle = Flat
Ben - 01 Jul 2006 00:58 GMT
FUnky,

I tried the setting below but no luck.

After looking around it looks like my problem has to do with putting an
image over another image. The top most image is using the form background as
its transparency instead on the image that is directly behind it.

Any ideas how on this?

Thanks for your help.

Ben

> Try the following for the button :
> BackColor = Transparent
> FlatAppearance.BorderColor = Control
> FlatAppearance.BorderSize = 0
> FlatStyle = Flat

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.