AddCurtain

 

Purpose: Add curtains shading date ranges on a schedule.

 

Returns: (if result variable supplied) the (int) 0 based index of the added curtain (not set if block not added)

 

Argument  

Type

Required

Purpose

1

Variant

Yes

Curtain starting date and time

2

Variant

Yes

Curtain ending date and time

 

 

 

Public Sub Addcurtain(objmilestones As Object)

        With objmilestones

            .Activate()

            .allcolorsarergb()

            .SetStartAndEndDates("01/01/2024", "06/30/2025")
            .refresh()

            'set up curtains

            .setmiscproperty("ShowCurtainsOverHorzGridlines", 1)

            'Curtain 1
            .AddCurtain("1/1/2024", "1/15/2024")

            'Curtain 2
            .AddCurtain("1/1/2024", "1/15/2024")

            'Curtain 3
            .AddCurtain("4/8/2024", "4/15/2024")

            'Curtain 4
            .AddCurtain("2/1/2025", "2/15/2025")

            ' Set Curtain Properties(Curtain number, start date, end date, pattern color, background color, fill patterns (1-27), border, curtain name (optional))
            .SetCurtainProperties(1, "1/1/2024", "1/15/2024", RGB(255, 0, 0), RGB(0, 0, 0), 1, 0, "Red")


            .SetCurtainProperties(2, "2/1/2024", "2/22/2024", RGB(0, 255, 0), RGB(0, 0, 0), 1, 0, "Green")

            'skyblue and gold boxes
            .SetCurtainProperties(3, "4/8/2024", "6/15/2024", RGB(153, 204, 255), RGB(255, 204, 0), 14, 0)

            'black and yellow smiley faces
            .SetCurtainProperties(4, "2/1/2025", "3/15/2025", RGB(0, 0, 0), RGB(255, 255, 0), 8, 0)

            .settasklinecurtain(1, 1, "red", "3/1/2024", "6/30/2024")

            .settasklinecurtain(1, 2, "green", "8/1/2024", "4/30/2025")

            .Refresh()


        End With


        Exit Sub


    End Sub

 

Related Topics

  1. Example 13 - A Milestones automation sampler
  2. DeleteCurtain
  3. GetCurtainCount
  4. SetCurtainDisplayOptions
  5. SetCurtainProperties
  6. SetCurtainNamedProperty

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To effectively program with this interface, it's important to learn all about Milestones Professional.  Learn about Milestones.

Milestones Professional 2025 Automation Methods and Properties.  © Copyright 2000-2025, KIDASA Software, Inc. All rights reserved.