Gantt Chart TV Scheduling Example
Details
Date:10/15/2008 6:23:13 PM
Product:ActiveGanttVC Gantt Chart / Scheduler Component
Framework:Visual Studio 6.0
Version:2.6.12
User's Development Environment:C# Visual Studio 2008
Subject:TV Scheduling in Microsoft Access
Question

I would like to see an example of the TV scheduling application running in Microsoft Access.

Answer

Answer:

Microsoft Access uses Visual Basic for Applications, so it's simply a question of pasting the code from the fTVScheduling01.frm of the demo into Access. The code you would need to paste is the following:


Option Explicit

Private Enum E_FONTTYPES
    FNT_NORMAL = 0
    FNT_BOLD = 1
    FNT_BOLD9 = 2
    FNT_BOLD11 = 3
End Enum

Private Function NewDate(ByVal Month As Integer, ByVal Day As Integer, ByVal Year As Integer, ByVal Hour As Integer, ByVal Minute As Integer)
    NewDate = DateSerial(Year, Month, Day) + TimeSerial(Hour, Minute, 0)
End Function

Private Sub Form_Load()
    Me.Left = (fMain.Left + (fMain.Width / 2)) - (Me.Width / 2)
    Me.Top = (fMain.Top + (fMain.Height / 2)) - (Me.Height / 2)

    Me.Caption = "The Source Code Store - ActiveGantt Scheduler Control Version " & ActiveGanttVBCtl1.Version & " - TV Schedule Example"
    ActiveGanttVBCtl1.DefaultValues.RowHeight = 30
    
    ActiveGanttVBCtl1.Styles.Add "TVStations"
    
    ActiveGanttVBCtl1.Styles.Item("TVStations").Appearance = E_STYLEAPPEARANCE.SA_CELL
    ActiveGanttVBCtl1.Styles.Item("TVStations").BackColor = mp_ConvertColor(&H80000005)
    
    ActiveGanttVBCtl1.Styles.Add "ABC"
    
    ActiveGanttVBCtl1.Styles.Item("ABC").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("ABC").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("ABC").BackColor = mp_ConvertColor(RGB(255, 204, 0))
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("ABC").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "NBC"
    
    ActiveGanttVBCtl1.Styles.Item("NBC").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("NBC").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("NBC").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_HORIZONTAL
    ActiveGanttVBCtl1.Styles.Item("NBC").StartGradientColor = mp_ConvertColor(RGB(255, 142, 0))
    ActiveGanttVBCtl1.Styles.Item("NBC").EndGradientColor = mp_ConvertColor(RGB(206, 8, 8))
    ActiveGanttVBCtl1.Styles.Item("NBC").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("NBC").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("NBC").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "MSNBC"
    
    ActiveGanttVBCtl1.Styles.Item("MSNBC").UseMask = False
    ActiveGanttVBCtl1.Styles.Item("MSNBC").Appearance = E_STYLEAPPEARANCE.SA_GRAPHICAL
    Set ActiveGanttVBCtl1.Styles.Item("MSNBC").TaskStyle.StartPicture = imgMSNBC.ListImages.Item(1).Picture
    Set ActiveGanttVBCtl1.Styles.Item("MSNBC").TaskStyle.MiddlePicture = imgMSNBC.ListImages.Item(2).Picture
    Set ActiveGanttVBCtl1.Styles.Item("MSNBC").TaskStyle.EndPicture = imgMSNBC.ListImages.Item(3).Picture
    ActiveGanttVBCtl1.Styles.Item("MSNBC").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("MSNBC").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "AE"
    
    ActiveGanttVBCtl1.Styles.Item("AE").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("AE").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("AE").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("AE").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("AE").StartGradientColor = mp_ConvertColor(RGB(13, 7, 51))
    ActiveGanttVBCtl1.Styles.Item("AE").EndGradientColor = mp_ConvertColor(RGB(66, 44, 41))
    ActiveGanttVBCtl1.Styles.Item("AE").ForeColor = mp_ConvertColor(RGB(255, 204, 0))
    ActiveGanttVBCtl1.Styles.Item("AE").BorderColor = mp_ConvertColor(RGB(255, 204, 0))
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("AE").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "HBO"
    
    ActiveGanttVBCtl1.Styles.Item("HBO").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("HBO").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("HBO").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("HBO").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("HBO").StartGradientColor = mp_ConvertColor(RGB(156, 174, 214))
    ActiveGanttVBCtl1.Styles.Item("HBO").EndGradientColor = mp_ConvertColor(RGB(198, 207, 231))
    ActiveGanttVBCtl1.Styles.Item("HBO").BackColor = mp_ConvertColor(RGB(153, 172, 215))
    ActiveGanttVBCtl1.Styles.Item("HBO").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("HBO").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "CNN"
    
    ActiveGanttVBCtl1.Styles.Item("CNN").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("CNN").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("CNN").BackColor = mp_ConvertColor(RGB(206, 5, 2))
    ActiveGanttVBCtl1.Styles.Item("CNN").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("CNN").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "CNMXRAI"
    
    ActiveGanttVBCtl1.Styles.Item("CNMXRAI").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("CNMXRAI").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("CNMXRAI").BackColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("CNMXRAI").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "DW"
    
    ActiveGanttVBCtl1.Styles.Item("DW").UseMask = False
    ActiveGanttVBCtl1.Styles.Item("DW").Appearance = E_STYLEAPPEARANCE.SA_GRAPHICAL
    Set ActiveGanttVBCtl1.Styles.Item("DW").TaskStyle.StartPicture = imgDW.ListImages.Item(1).Picture
    Set ActiveGanttVBCtl1.Styles.Item("DW").TaskStyle.MiddlePicture = imgDW.ListImages.Item(1).Picture
    Set ActiveGanttVBCtl1.Styles.Item("DW").TaskStyle.EndPicture = imgDW.ListImages.Item(2).Picture
    ActiveGanttVBCtl1.Styles.Item("DW").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("DW").Font, E_FONTTYPES.FNT_BOLD9
    
    ActiveGanttVBCtl1.Styles.Add "ESPN"
    
    ActiveGanttVBCtl1.Styles.Item("ESPN").UseMask = False
    ActiveGanttVBCtl1.Styles.Item("ESPN").Appearance = E_STYLEAPPEARANCE.SA_GRAPHICAL
    Set ActiveGanttVBCtl1.Styles.Item("ESPN").TaskStyle.StartPicture = imgESPN.ListImages.Item(1).Picture
    Set ActiveGanttVBCtl1.Styles.Item("ESPN").TaskStyle.MiddlePicture = imgESPN.ListImages.Item(1).Picture
    Set ActiveGanttVBCtl1.Styles.Item("ESPN").TaskStyle.EndPicture = imgESPN.ListImages.Item(2).Picture
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("ESPN").Font, E_FONTTYPES.FNT_BOLD9
    
    ActiveGanttVBCtl1.Styles.Add "DISC"
    
    ActiveGanttVBCtl1.Styles.Item("DISC").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("DISC").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("DISC").BackColor = mp_ConvertColor(RGB(49, 68, 139))
    ActiveGanttVBCtl1.Styles.Item("DISC").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("DISC").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "CART"
    
    ActiveGanttVBCtl1.Styles.Item("CART").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("CART").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("CART").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("CART").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("CART").StartGradientColor = mp_ConvertColor(RGB(0, 0, 0))
    ActiveGanttVBCtl1.Styles.Item("CART").EndGradientColor = mp_ConvertColor(RGB(60, 60, 60))
    ActiveGanttVBCtl1.Styles.Item("CART").BorderColor = mp_ConvertColor(&H80000005)
    ActiveGanttVBCtl1.Styles.Item("CART").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("CART").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "CBS"
    
    ActiveGanttVBCtl1.Styles.Item("CBS").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("CBS").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("CBS").BackColor = mp_ConvertColor(RGB(4, 54, 155))
    ActiveGanttVBCtl1.Styles.Item("CBS").ForeColor = mp_ConvertColor(RGB(255, 204, 0))
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("CBS").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "BBC"
    
    ActiveGanttVBCtl1.Styles.Item("BBC").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("BBC").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("BBC").BackColor = mp_ConvertColor(RGB(153, 153, 153))
    ActiveGanttVBCtl1.Styles.Item("BBC").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("BBC").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "WEATH"
    
    ActiveGanttVBCtl1.Styles.Item("WEATH").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("WEATH").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("WEATH").BackColor = mp_ConvertColor(RGB(116, 140, 188))
    ActiveGanttVBCtl1.Styles.Item("WEATH").ForeColor = mp_ConvertColor(&H80000005)
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("WEATH").Font, E_FONTTYPES.FNT_BOLD
    
    ActiveGanttVBCtl1.Styles.Add "TimeLineStyle"
    
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").BorderColor = mp_ConvertColor(RGB(0, 0, 0))
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").StartGradientColor = mp_ConvertColor(RGB(214, 16, 8))
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").EndGradientColor = mp_ConvertColor(RGB(255, 142, 0))
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").Font, E_FONTTYPES.FNT_BOLD11
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").CaptionAlignmentVertical = GRE_VERTICALALIGNMENT.VAL_BOTTOM
    ActiveGanttVBCtl1.Styles.Item("TimeLineStyle").ForeColor = mp_ConvertColor(RGB(255, 255, 255))
    
    ActiveGanttVBCtl1.Styles.Add "LowerTierStyle"
    
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").BorderColor = mp_ConvertColor(RGB(255, 255, 255))
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").ForeColor = mp_ConvertColor(RGB(255, 255, 255))
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").StartGradientColor = mp_ConvertColor(RGB(152, 116, 253))
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").EndGradientColor = mp_ConvertColor(RGB(35, 51, 251))
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").CaptionVisible = True
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").CaptionAlignmentHorizontal = GRE_HORIZONTALALIGNMENT.HAL_CENTER
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").ClipCaption = True
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").Font, E_FONTTYPES.FNT_NORMAL
    ActiveGanttVBCtl1.Styles.Item("LowerTierStyle").DrawCaptionInVisibleArea = True
    
    ActiveGanttVBCtl1.Styles.Add "UpperTierStyle"
    
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").Appearance = E_STYLEAPPEARANCE.SA_FLAT
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").BorderStyle = E_STYLEBORDER.SBR_SINGLE
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").BorderColor = mp_ConvertColor(RGB(255, 255, 255))
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").BackgroundPattern = GRE_BACKGROUNDPATTERN.FP_GRADIENT
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").ForeColor = mp_ConvertColor(RGB(0, 0, 0))
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").GradientFillMode = GRE_GRADIENTFILLMODE.GDT_VERTICAL
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").StartGradientColor = mp_ConvertColor(RGB(156, 174, 214))
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").EndGradientColor = mp_ConvertColor(RGB(198, 207, 231))
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").CaptionVisible = True
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").CaptionAlignmentHorizontal = GRE_HORIZONTALALIGNMENT.HAL_CENTER
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").ClipCaption = True
    mp_ConvertFont ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").Font, E_FONTTYPES.FNT_BOLD
    ActiveGanttVBCtl1.Styles.Item("UpperTierStyle").DrawCaptionInVisibleArea = True
    
    ActiveGanttVBCtl1.Rows.Add "ABC", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("ABC").Picture = imgChannels.ListImages.Item(1).Picture
    ActiveGanttVBCtl1.Rows.Add "NBC", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("NBC").Picture = imgChannels.ListImages.Item(2).Picture
    ActiveGanttVBCtl1.Rows.Add "MSNBC", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("MSNBC").Picture = imgChannels.ListImages.Item(3).Picture
    ActiveGanttVBCtl1.Rows.Add "DW", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("DW").Picture = imgChannels.ListImages.Item(4).Picture
    ActiveGanttVBCtl1.Rows.Add "AE", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("AE").Picture = imgChannels.ListImages.Item(5).Picture
    ActiveGanttVBCtl1.Rows.Add "HBO", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("HBO").Picture = imgChannels.ListImages.Item(6).Picture
    ActiveGanttVBCtl1.Rows.Add "ESPN", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("ESPN").Picture = imgChannels.ListImages.Item(7).Picture
    ActiveGanttVBCtl1.Rows.Add "CNN", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("CNN").Picture = imgChannels.ListImages.Item(8).Picture
    ActiveGanttVBCtl1.Rows.Add "CNMX", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("CNMX").Picture = imgChannels.ListImages.Item(9).Picture
    ActiveGanttVBCtl1.Rows.Add "CBS", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("CBS").Picture = imgChannels.ListImages.Item(10).Picture
    ActiveGanttVBCtl1.Rows.Add "CART", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("CART").Picture = imgChannels.ListImages.Item(11).Picture
    ActiveGanttVBCtl1.Rows.Add "DISC", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("DISC").Picture = imgChannels.ListImages.Item(12).Picture
    ActiveGanttVBCtl1.Rows.Add "RAI", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("RAI").Picture = imgChannels.ListImages.Item(13).Picture
    ActiveGanttVBCtl1.Rows.Add "BBC", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("BBC").Picture = imgChannels.ListImages.Item(14).Picture
    ActiveGanttVBCtl1.Rows.Add "WEATH", , True, , 1
    Set ActiveGanttVBCtl1.Rows.Item("WEATH").Picture = imgChannels.ListImages.Item(15).Picture
    
    
    ActiveGanttVBCtl1.Tasks.Add "Spin City", "ABC", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 30), , "ABC"
    ActiveGanttVBCtl1.Tasks.Add "Spin City", "ABC", NewDate(3, 11, 2003, 17, 30), NewDate(3, 11, 2003, 18, 0), , "ABC"
    ActiveGanttVBCtl1.Tasks.Add "Boston 24/7", "ABC", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 19, 0), , "ABC"
    ActiveGanttVBCtl1.Tasks.Add "SPY TV", "NBC", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 18, 0), , "NBC"
    ActiveGanttVBCtl1.Tasks.Add "Frasier", "NBC", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 19, 0), , "NBC"
    ActiveGanttVBCtl1.Tasks.Add "Hardball with Chris Matthews", "MSNBC", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 18, 0), , "MSNBC"
    ActiveGanttVBCtl1.Tasks.Add "MSNBC Live", "MSNBC", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 19, 0), , "MSNBC"
    ActiveGanttVBCtl1.Tasks.Add "Deutschland Heute", "DW", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 30), , "DW"
    ActiveGanttVBCtl1.Tasks.Add "Journal", "DW", NewDate(3, 11, 2003, 17, 30), NewDate(3, 11, 2003, 18, 0), , "DW"
    ActiveGanttVBCtl1.Tasks.Add "Close Up", "DW", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 18, 30), , "DW"
    ActiveGanttVBCtl1.Tasks.Add "Reiseland Deutschland", "DW", NewDate(3, 11, 2003, 18, 30), NewDate(3, 11, 2003, 19, 0), , "DW"
    ActiveGanttVBCtl1.Tasks.Add "Any Given Sunday", "HBO", NewDate(3, 11, 2003, 15, 0), NewDate(3, 11, 2003, 18, 15), , "HBO"
    ActiveGanttVBCtl1.Tasks.Add "Silk Hope", "HBO", NewDate(3, 11, 2003, 18, 15), NewDate(3, 11, 2003, 20, 30), , "HBO"
    ActiveGanttVBCtl1.Tasks.Add "FIM Road Racing World", "ESPN", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 18, 0), , "ESPN"
    ActiveGanttVBCtl1.Tasks.Add "Sports Center", "ESPN", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 20, 30), , "ESPN"
    ActiveGanttVBCtl1.Tasks.Add "Newsbiz Today", "CNN", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 30), , "CNN"
    ActiveGanttVBCtl1.Tasks.Add "Larry King Live", "CNN", NewDate(3, 11, 2003, 17, 30), NewDate(3, 11, 2003, 18, 15), , "CNN"
    ActiveGanttVBCtl1.Tasks.Add "World News", "CNN", NewDate(3, 11, 2003, 18, 15), NewDate(3, 11, 2003, 19, 50), , "CNN"
    ActiveGanttVBCtl1.Tasks.Add "Dragon Balls Z", "CART", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 30), , "CART"
    ActiveGanttVBCtl1.Tasks.Add "PowerPuff Girls", "CART", NewDate(3, 11, 2003, 17, 30), NewDate(3, 11, 2003, 18, 0), , "CART"
    ActiveGanttVBCtl1.Tasks.Add "Time Squad", "CART", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 19, 30), , "CART"
    ActiveGanttVBCtl1.Tasks.Add "FBI Files", "DISC", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 45), , "DISC"
    ActiveGanttVBCtl1.Tasks.Add "The New Detectives", "DISC", NewDate(3, 11, 2003, 17, 45), NewDate(3, 11, 2003, 18, 15), , "DISC"
    ActiveGanttVBCtl1.Tasks.Add "Shark Files", "DISC", NewDate(3, 11, 2003, 18, 15), NewDate(3, 11, 2003, 19, 30), , "DISC"
    ActiveGanttVBCtl1.Tasks.Add "Biography", "AE", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 18, 5), , "AE"
    ActiveGanttVBCtl1.Tasks.Add "Law and Order", "AE", NewDate(3, 11, 2003, 18, 5), NewDate(3, 11, 2003, 18, 45), , "AE"
    ActiveGanttVBCtl1.Tasks.Add "The view", "AE", NewDate(3, 11, 2003, 18, 45), NewDate(3, 11, 2003, 19, 30), , "AE"
    ActiveGanttVBCtl1.Tasks.Add "The Early Show", "CBS", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 18, 5), , "CBS"
    ActiveGanttVBCtl1.Tasks.Add "Evening News", "CBS", NewDate(3, 11, 2003, 18, 5), NewDate(3, 11, 2003, 18, 45), , "CBS"
    ActiveGanttVBCtl1.Tasks.Add "60 Minutes", "CBS", NewDate(3, 11, 2003, 18, 45), NewDate(3, 11, 2003, 19, 30), , "CBS"
    ActiveGanttVBCtl1.Tasks.Add "Qui Roma", "RAI", NewDate(3, 11, 2003, 17, 0), NewDate(3, 11, 2003, 17, 40), , "CNMXRAI"
    ActiveGanttVBCtl1.Tasks.Add "C'era una Volta", "RAI", NewDate(3, 11, 2003, 17, 40), NewDate(3, 11, 2003, 20, 30), , "CNMXRAI"
    ActiveGanttVBCtl1.Tasks.Add "World Service", "BBC", NewDate(3, 11, 2003, 16, 0), NewDate(3, 11, 2003, 18, 0), , "BBC"
    ActiveGanttVBCtl1.Tasks.Add "World Service", "BBC", NewDate(3, 11, 2003, 18, 0), NewDate(3, 11, 2003, 20, 0), , "BBC"
    ActiveGanttVBCtl1.Tasks.Add "World Weather", "WEATH", NewDate(3, 11, 2003, 15, 45), NewDate(3, 11, 2003, 17, 45), , "WEATH"
    ActiveGanttVBCtl1.Tasks.Add "World Weather", "WEATH", NewDate(3, 11, 2003, 17, 45), NewDate(3, 11, 2003, 19, 45), , "WEATH"
    ActiveGanttVBCtl1.Tasks.Add "Space Cowboys", "CNMX", NewDate(3, 11, 2003, 15, 0), NewDate(3, 11, 2003, 17, 50), , "CNMXRAI"
    ActiveGanttVBCtl1.Tasks.Add "Love And Basketball", "CNMX", NewDate(3, 11, 2003, 17, 50), NewDate(3, 11, 2003, 20, 30), , "CNMXRAI"
    
    ActiveGanttVBCtl1.Columns.Add "Channels:", "", 155, "TimeLineStyle"
    ActiveGanttVBCtl1.Splitter.Position = 155
    
    ActiveGanttVBCtl1.Views.Add "10s", "30n", E_TIERTYPE.ST_CUSTOM, E_TIERTYPE.ST_CUSTOM, E_TIERTYPE.ST_CUSTOM
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TierArea.UpperTier.Interval = "1m"
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TierArea.UpperTier.Height = 17
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TierArea.LowerTier.Interval = "1d"
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TierArea.LowerTier.Height = 17
    ActiveGanttVBCtl1.Views.Item(1).ClientArea.ToolTipsVisible = False
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.StyleIndex = "TimeLineStyle"
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.Appearance = E_BORDERSTYLE.TLB_SINGLE
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.ForeColor = mp_ConvertColor(RGB(255, 255, 255))
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TickMarkArea.TickMarks.Add 60, E_TICKMARKTYPES.TLT_BIG, False, "", True
    ActiveGanttVBCtl1.Views.Item(1).TimeLine.TickMarkArea.TickMarks.Add 30, E_TICKMARKTYPES.TLT_MEDIUM, True, "Hh:Nnam/pm", True
    mp_ConvertFont ActiveGanttVBCtl1.Views.Item("1").TimeLine.TickMarkArea.Font, E_FONTTYPES.FNT_NORMAL
    ActiveGanttVBCtl1.CurrentView = "1"
    ActiveGanttVBCtl1.CurrentViewObject.TimeLine.Position NewDate(3, 11, 2003, 17, 0)
    ActiveGanttVBCtl1.Redraw

End Sub

Private Sub ActiveGanttVBCtl1_CustomTierDraw(ByVal Position As ActiveGanttVB.E_TIERPOSITION, ByVal StartDate As Date, ByVal EndDate As Date, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long, ByVal LeftTrim As Long, ByVal RightTrim As Long, ByVal lHdc As Long, Caption As String, StyleIndex As String)
    If Position = E_TIERPOSITION.SP_LOWER Then
        StyleIndex = "LowerTierStyle"
        Caption = Format(StartDate, "dddd d")
    ElseIf Position = E_TIERPOSITION.SP_UPPER Then
        StyleIndex = "UpperTierStyle"
        Caption = Format(StartDate, "mmmm yyyy")
    End If
End Sub

Private Function mp_ConvertColor(ByVal Color As OLE_COLOR) As OLE_COLOR
'// Function for Simple VB.Net Migrations
    mp_ConvertColor = Color
End Function

Private Sub mp_ConvertFont(ByRef oFont As Font, ByVal oFontType As E_FONTTYPES)
'// Function for Simple VB.Net Migrations
    Select Case oFontType
        Case FNT_NORMAL
            oFont.Name = "Verdana"
        Case FNT_BOLD
            oFont.Name = "Verdana"
            oFont.Bold = True
        Case FNT_BOLD9
            oFont.Name = "Verdana"
            oFont.Bold = True
            oFont.Size = 9
        Case FNT_BOLD11
            oFont.Name = "Verdana"
            oFont.Bold = True
            oFont.Size = 11
    End Select
End Sub

And you must use ActiveGanttVC in Access, ActiveGanttVB will not work because of an interface problem with Microsoft Access.

 

All trademarks are property of their respective holders, and are only used to directly describe the products and services being provided. Their use in no way indicates any relationship or endorsement between The Source Code Store LLC and the holders of said trademarks.