Results 1 to 8 of 8

Thread: Change form border color?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    225

    Change form border color?

    Is it possible to change the border color of a form?

  2. #2
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    The only way I know of is to change the system settings so that all active window borders are set to the color of your choice. I don't think there is an easy way to do it, but you can see if someone here that knows how to subclass can do it.
    <removed by admin>

  3. #3
    Yash_Kumar
    Guest
    Add the attached class module to your project and you could use this code to change the color of the form's border

    Code:
    Option Explicit
    Dim cColors As New SystemColors
    Dim intPrevColor As Long
    
    Private Sub Form_Load()
    intPrevColor = cColors.ActiveBorder
    
    cColors.ActiveBorder = RGB(100, 100, 100)
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
    cColors.ActiveBorder = intPrevColor
    End Sub
    Hope it helps

  4. #4
    AngelFire
    Guest

    Talking Hmm

    why dont u draw a new one??

  5. #5
    Member
    Join Date
    Apr 2016
    Posts
    61

    Re: Change form border color?

    New SystemColors is not available for reference?!

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Change form border color?

    Quote Originally Posted by ramp10er View Post
    New SystemColors is not available for reference?!
    You do realize you are replying to a post that may be older than some newbie coders
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Change form border color?

    Quote Originally Posted by ramp10er View Post
    New SystemColors is not available for reference?!
    I take it that you did not notice this thread was from 2001.

  8. #8
    Member
    Join Date
    Apr 2016
    Posts
    61

    Re: Change form border color?

    Yes! I did not notice it...

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