Results 1 to 5 of 5

Thread: DAMN Microsoft can be GAY...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Posts
    83

    Talking

    DAMN Microsoft can be gay..
    does ANYONE have a treeview that can have the colors on it CHANGED? )
    as in BackColor ForeColor etc..

    for some reason Microsoft didn't put it in their one /


    Yeh i sorta need it really urgently aswell :/


    If anyone knows were i can get a treeview control with customizable colors pls email me or reply )


    thx.. sphynx

  2. #2
    Lively Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    97

    Wink

    here u go -------->

    Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As _
    Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd _
    As Long, ByVal nIndex As Long) As Long
    Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd _
    As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

    Const GWL_STYLE = -16&
    Const TVM_SETBKCOLOR = 4381&
    Const TVS_HASLINES = 2&

    Sub SetTreeViewBackColor(TV As TreeView, ByVal BackColor As Long)
    Dim lStyle As Long
    Dim TVNode As node

    ' set the BackColor for every node
    For Each TVNode In TV.Nodes
    TVNode.BackColor = BackColor
    Next

    ' set the BackColor for the TreeView's window
    SendMessage TV.hwnd, TVM_SETBKCOLOR, 0, ByVal BackColor
    ' get the current style
    lStyle = GetWindowLong(TV.hwnd, GWL_STYLE)
    ' temporary hide lines
    SetWindowLong TV.hwnd, GWL_STYLE, lStyle And (Not TVS_HASLINES)
    ' redraw lines
    SetWindowLong TV.hwnd, GWL_STYLE, lStyle
    End Sub


    hope it helps....
    capreal26

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Posts
    83

    thx heaps :)

    thx heaps
    i really apreciate the help
    may u live long and prosper..

    ** however..
    would u also know how to change the FORECOLOR?

    thx

  4. #4
    New Member Mega Muffin's Avatar
    Join Date
    Mar 2001
    Location
    In a pear tree
    Posts
    10
    Originally posted by sphynx
    DAMN Microsoft can be gay..
    Political correctness gone mad. Companies can now have a sexuality. Where will it end??
    Mega Muffin will rise again

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Posts
    83

    lol

    lol

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