Results 1 to 10 of 10

Thread: Non-squared form

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2003
    Posts
    19

    Question Non-squared form

    How can I have a Non-squared form?
    In an application I saw a form which was like a Star.
    is it possible to have such a forms in VB?

    Thanks in advance

    Reza

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Non-squared form

    Yes its possible. You need to use the CreateRectRgn or CreatePolygonRgn for example.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Non-squared form

    Here are a few links, relating to this you may find interesting:



    Cheers and hope that helps,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: Non-squared form

    Here are some examples I got from PlanetSourceCode.

    Hope it helps!
    Attached Files Attached Files
    VB.NET MVP 2008 - Present

  5. #5
    New Member
    Join Date
    May 2005
    Posts
    4

    Re: Non-squared form

    how can create forum remove pixel transparent and view pixel <> transparent (ex jetaudio, window media player

  6. #6
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Non-squared form

    Do you mean to make part of you form transparent? Like where there is a color to make it transparent?


    Has someone helped you? Then you can Rate their helpful post.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2003
    Posts
    19

    Re: Non-squared form

    Quote Originally Posted by manavo11
    Do you mean to make part of you form transparent? Like where there is a color to make it transparent?

    I don't know how it is possible.
    for example i want to have a form like a Star.
    if it is possible by making some part of form transparent I would apprecitae if you let me know.

  8. #8
    New Member
    Join Date
    May 2005
    Posts
    4

    Re: Non-squared form

    i see, it draw form , remove region of transparent thanks

  9. #9
    Software Eng. Megatron's Avatar
    Join Date
    Mar 1999
    Location
    Canada
    Posts
    11,286

    Re: Non-squared form

    Quote Originally Posted by Reza
    I don't know how it is possible.
    for example i want to have a form like a Star.
    if it is possible by making some part of form transparent I would apprecitae if you let me know.
    Look at the links Ryan and Rob provided.

    This is done via regions.

  10. #10
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Non-squared form

    Quote Originally Posted by Reza
    I don't know how it is possible.
    for example i want to have a form like a Star.
    if it is possible by making some part of form transparent I would apprecitae if you let me know.
    If you want to make one colour transparent or translucent then you can use alpha-blending with a colour key.

    Head over to the alpha-blending link in my sig, and include this as well:
    VB Code:
    1. Private Const LWA_COLORKEY As Long = &H1
    2.  
    3. ' For each line with SetLayeredWindowAttributes,
    4. ' change the 2nd parameter to a Long RGB value for your colorkey
    5. ' you can get this through RGB([r], [g], [b]) with each val 0-255
    6. ' And to the end of each of those lines, add this
    7. Or LWA_COLORKEY

    HTH

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