Results 1 to 2 of 2

Thread: Filling control with color

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    Hyderabad
    Posts
    23
    I have a usercontrol by name octo ( which is having 8 sides ) I created the control like follows:

    1. selected new control
    2. placed a shape control on it
    3. placed 8 lines on shape control
    4. arranged 8 sides (lines) so that it forms a closed box.

    _______
    / \
    | |
    | |
    \ /
    _____

    My question is I want to fill the box with some color at run time. How can it possible? If it is a shape control we can easily do it by filling black color.

    reply at the earliest
    Thanks
    Kiran

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Using this API you can fill an area that is restricted with ie lines. I'm not sure if it works with line controls but if you use the line method it surely works:
    Code:
    Declare Sub FloodFill Lib "GDI32" Alias "FloodFill" _
     (ByVal hDC As Long, ByVal X As Long, ByVal Y As _
     Long, ByVal crColor As Long) As Long

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