CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2000
    Posts
    737

    what can't msflexgrid cellforecolor accept negative value ?

    i try to set the color of a cell in msflexgtid, something like this, but it failed

    msflexgrid1.cellforecolor = &h8000

    please advise, thanks


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    Re: what can't msflexgrid cellforecolor accept negative value ?

    Use the GetSysColor api to convert windows colors to real color values.

    Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long

    C& = &h8000
    msflexgrid1.cellforecolor = GetSysColor(C And &HFFFFFF)


    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: what can't msflexgrid cellforecolor accept negative value ?

    MSFlexGrid1.CellForeColor = vbRed

    Iouri Boutchkine
    iouri@hotsheet.com
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

  4. #4
    Join Date
    Apr 2000
    Posts
    737

    Re: what can't msflexgrid cellforecolor accept negative value ?

    i forgot to place & at the back, should be

    &h8000&


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

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

Featured