Results 1 to 12 of 12

Thread: How to make a form irregular in shape and style???

  1. #1

    Thread Starter
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935

    How to make a form irregular in shape and style???

    Hello Chaps and Chappettes

    I am wanting to customise my gui I know that it is possible to make a form a custom shape and style, however I have no idea of how to go about doing this.

    If someone could give me an idea of where to start or of any online resources/tutorials it would be very helpful

    Thanks in advance


  2. #2
    DaoK
    Guest
    You can use an application who will create for you the form. I do not remember the name but its an activeX.

  3. #3
    Addicted Member rbnwares's Avatar
    Join Date
    Sep 2000
    Location
    Philippines
    Posts
    142
    Use SetWindowRgn to do this.
    Stupidity is better than cure.

    VB6 SP5 Enterprise Ed.
    C, Pascal, VC++ 6.0


    Running Win98 SE and Win2000 Prof. Ed.


    Email me at : [email protected]

  4. #4
    Originally posted by DaoK
    You can use an application who will create for you the form. I do not remember the name but its an activeX.
    In one of my programs, I used the PolyForm control at http://www.geocities.com/SiliconValley/Haven/2118 to accomplish this task.

  5. #5

  6. #6

    Thread Starter
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    Originally Posted by rbnwares
    Use SetWindowRgn to do this.
    Can you explain this a bit further rbnwares??

    thanks filburt1 i will check that app out

    but i would like to do it via code if at all possible

  7. #7

  8. #8
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    I've used this tool for all my weird shaped form needs.... Just go into ms paint, make your desired shape in solid black, overtop the white background, and let this program trace it and come up with a .frm file!

    http://www.fortunecity.com/skyscrape...tml?VBSFC.html

    kudos to Alex Vallat for making this program it is fantastic!

  9. #9
    Addicted Member rbnwares's Avatar
    Join Date
    Sep 2000
    Location
    Philippines
    Posts
    142
    Use one of these functions to create a region:
    CreateEllipticRgn
    CreatePolygonRgn
    CreateRectRgn
    CreateRoundRectRgn

    You can combine the regions created by the functions above to create a hole in the region, use:
    CombineRgn

    Set the created region to your form, use:
    SetWindowRgn

    You can code it like this:
    PHP Code:
    Dim hRgn As Long

    hRgn 
    CreateEllipticRgn(0,0,Me.Width/Screen.TwipsPerPixelX,Me.Height/Screen.TwipsPerPixelY)
    Call SetWindowRgn(Me.hWndhRgnTrue
    Stupidity is better than cure.

    VB6 SP5 Enterprise Ed.
    C, Pascal, VC++ 6.0


    Running Win98 SE and Win2000 Prof. Ed.


    Email me at : [email protected]

  10. #10
    DaoK
    Guest
    PolyForm
    Exacly what I searched!!!!! Good Job Arien

  11. #11
    I'm so proud of myself.

  12. #12
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Originally posted by Redth
    I've used this tool for all my weird shaped form needs.... Just go into ms paint, make your desired shape in solid black, overtop the white background, and let this program trace it and come up with a .frm file!

    http://www.fortunecity.com/skyscrape...tml?VBSFC.html

    kudos to Alex Vallat for making this program it is fantastic!
    I concour, that tool is cool stuff. You can draw basically any shape and it does all the code for you, even thinks to include code to deal with dragging.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width