Results 1 to 10 of 10

Thread: Enabled = False

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74

    Arrow

    Hello,

    Is it possible to change the color of a font when I set its enabled property to False?


    Thanks.


    Deju

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    In English:
    What kind of control do you use?

    In Dutch:
    Welke control gebruik je?
    Oetje
    oetje@home.nl
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74
    Geen enkele

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    In English:
    Do you draw on a form?

    In Dutch:
    Teken je dan op een form ofzo?
    Oetje
    oetje@home.nl
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    English: You're setting a font to disabled? huh? the form?

    Nederlands: Leuk dat er nog meer Nederlanders/Belgen zijn hè Oetje

    English: Oh by the way, I think the disabled text color is a System Color... you can change it for the whole system if you need to, but not that elegant.

    [Edited by Jop on 11-16-2000 at 09:07 AM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'In 3 words and a symbol

    Disabled = Greyed Out
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7
    Guest
    Why not just set the control's color to any color and...

    Example:

    If control.forecolor = color Then Exit Sub

  8. #8
    Guest
    You can change the control's disable colour, but it'll have to be systemwide.

  9. #9
    Guest
    Here is an example.
    Code:
    Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
    Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
    Const COLOR_GRAYTEXT = 17
    Dim lForeColor
    
    Private Sub Form_Load()
        lForeColor = GetSysColor(COLOR_GRAYTEXT)
        SetSysColors 1, COLOR_GRAYTEXT, vbGreen
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
        SetSysColors 1, COLOR_GRAYTEXT, lForeColor
    End Sub

  10. #10
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617
    danke fur
    askjsuds jepimaf alksd
    merci beaucoup
    gracias
    kasweansajasdy asdh astdsa

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