Solved

irregular form gui shape

Posted on 2004-10-26
230 Views
Last Modified: 2010-04-15
I've been able to make circles and triangular shaped guis using regions, but is there a way to have the gui in the shape of an image? For instance, what if I have an image of a bicycle and would like to make this the gui... I just want the bicycle to show up or what ever image is used. This is not possible with regions because it won't work by just clipping regions... How can I do this? I've seen guis where the gui is in the form of a person... So it's possible but I just don't see how? Any help...
0
Question by:dotnet22
    3 Comments
     
    LVL 3

    Accepted Solution

    by:
    you can do it using transparency
    1- put an image in your resource in the project (with back ground for examlpe whit)
    2- make it the form background
    3- make the transperency for the white colur


    a very good sample can be found to show your the idea can be located at :

    http://www.codeproject.com/cs/media/CsTranspTutorial3.asp
    0
     
    LVL 19

    Assisted Solution

    by:Desp
    the basic thing to do this is to create a form with some background color, and set the properties:
    TransparenceKey -> Form's Background color
    FormBorderStyle -> None
    and then Override the Form_Paint function

    you can find the whole application from here:
    http://www.codeproject.com/csharp/ShapedForm.asp

    for more help:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingnon-standardshapedwindowsforms.asp
    0
     
    LVL 7

    Assisted Solution

    by:God_Ares
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now