property Chart.MarkNow as Variant
Specifies the the current time to show in the chart.

TypeDescription
Variant A DATE expression to specify the date-time to be highlighted using the MarkNowColor property or empty if using the current date-time.
By default, the MarkNow property is empty, which indicates that the MarkNowColor property uses the current date-time to specify the date to be highlighted in the chart. The get function of the MarkNow property returns the date-time to be highlighted in the chart. You can use the MarkNow property to indicate a custom date to be shown instead the current date-time. For instance, the MarkNow = #03/13/2012 11:55AM# indicates that the MarkNowColor property marks the specified date instead the current date time. The MarkNowDelay property can be used to display the date time with a specified delay. The DateFromPoint property gets the date from the cursor position. The MarkNow/MarkNowDelay property can be used to specify the current date-time or your custom date time. When the MarkNow property is changed, the control fires the DateTimeChanged event.

The following samples shows how you can show a vertical line when user clicks the chart area.

VB6  

Private Sub G2antt1_Click()
	With G2antt1
		With .Chart
			.MarkNowColor = RGB(255,0,0)
			.MarkNow = .DateFromPoint(-1,-1)
		End With
	End With
End Sub

With G2antt1
	With .Chart
		.FirstVisibleDate = #3/13/2012#
		.PaneWidth(False) = 0
		.LevelCount = 2
		.MarkNowColor = RGB(0,0,0)
		.MarkNowWidth = 3
		.UnitWidth = 32
		.ResizeUnitScale = exHour
	End With
End With
VB.NET  
Private Sub Exg2antt1_Click(ByVal sender As System.Object) Handles Exg2antt1.Click
	With Exg2antt1
		With .Chart
			.MarkNowColor = Color.FromArgb(255,0,0)
			.MarkNow = .get_DateFromPoint(-1,-1)
		End With
	End With
End Sub

With Exg2antt1
	With .Chart
		.FirstVisibleDate = #3/13/2012#
		.set_PaneWidth(False,0)
		.LevelCount = 2
		.MarkNowColor = Color.FromArgb(0,0,0)
		.MarkNowWidth = 3
		.UnitWidth = 32
		.ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour
	End With
End With
VB.NET for /COM  
Private Sub AxG2antt1_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxG2antt1.ClickEvent
	With AxG2antt1
		With .Chart
			.MarkNowColor = RGB(255,0,0)
			.MarkNow = .DateFromPoint(-1,-1)
		End With
	End With
End Sub

With AxG2antt1
	With .Chart
		.FirstVisibleDate = #3/13/2012#
		.PaneWidth(False) = 0
		.LevelCount = 2
		.MarkNowColor = RGB(0,0,0)
		.MarkNowWidth = 3
		.UnitWidth = 32
		.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour
	End With
End With
C++  
void OnClickG2antt1()
{
	EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown()
	EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart()
		var_Chart->PutMarkNowColor(RGB(255,0,0))
		var_Chart->PutMarkNow(var_Chart->GetDateFromPoint(-1,-1))
}

EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutFirstVisibleDate("3/13/2012");
	var_Chart->PutPaneWidth(VARIANT_FALSE,0);
	var_Chart->PutLevelCount(2);
	var_Chart->PutMarkNowColor(RGB(0,0,0));
	var_Chart->PutMarkNowWidth(3);
	var_Chart->PutUnitWidth(32);
	var_Chart->PutResizeUnitScale(EXG2ANTTLib::exHour);
C++ Builder  
void __fastcall TForm1::G2antt1Click(TObject *Sender)
{
	Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart
		var_Chart->MarkNowColor = RGB(255,0,0)
		var_Chart->set_MarkNow(TVariant(var_Chart->get_DateFromPoint(-1,-1)))
}

Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart;
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2012,3,13).operator double()));
	var_Chart->set_PaneWidth(false,0);
	var_Chart->LevelCount = 2;
	var_Chart->MarkNowColor = RGB(0,0,0);
	var_Chart->MarkNowWidth = 3;
	var_Chart->UnitWidth = 32;
	var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour;
C#  
private void exg2antt1_Click(object sender)
{
	exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart
		var_Chart.MarkNowColor = Color.FromArgb(255,0,0)
		var_Chart.MarkNow = var_Chart.get_DateFromPoint(-1,-1)
}
//this.exg2antt1.Click += new exontrol.EXG2ANTTLib.exg2antt.ClickEventHandler(this.exg2antt1_Click);

exontrol.EXG2ANTTLib.Chart var_Chart = exg2antt1.Chart;
	var_Chart.FirstVisibleDate = Convert.ToDateTime("3/13/2012");
	var_Chart.set_PaneWidth(false,0);
	var_Chart.LevelCount = 2;
	var_Chart.MarkNowColor = Color.FromArgb(0,0,0);
	var_Chart.MarkNowWidth = 3;
	var_Chart.UnitWidth = 32;
	var_Chart.ResizeUnitScale = exontrol.EXG2ANTTLib.UnitEnum.exHour;
JavaScript  
<SCRIPT FOR="G2antt1" EVENT="Click()" LANGUAGE="JScript">
	var var_Chart = G2antt1.Chart
		var_Chart.MarkNowColor = 255
		var_Chart.MarkNow = var_Chart.DateFromPoint(-1,-1)
</SCRIPT>

<OBJECT classid="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	var var_Chart = G2antt1.Chart
		var_Chart.FirstVisibleDate = "3/13/2012"
		var_Chart.PaneWidth(false) = 0
		var_Chart.LevelCount = 2
		var_Chart.MarkNowColor = 0
		var_Chart.MarkNowWidth = 3
		var_Chart.UnitWidth = 32
		var_Chart.ResizeUnitScale = 65536
</SCRIPT>
C# for /COM  
private void axG2antt1_ClickEvent(object sender, EventArgs e)
{
	EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart
		var_Chart.MarkNowColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0))
		var_Chart.MarkNow = var_Chart.get_DateFromPoint(-1,-1)
}
//this.axG2antt1.ClickEvent += new EventHandler(this.axG2antt1_ClickEvent);

EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart;
	var_Chart.FirstVisibleDate = Convert.ToDateTime("3/13/2012");
	var_Chart.set_PaneWidth(false,0);
	var_Chart.LevelCount = 2;
	var_Chart.MarkNowColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0));
	var_Chart.MarkNowWidth = 3;
	var_Chart.UnitWidth = 32;
	var_Chart.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour;
X++ (Dynamics Ax 2009)  
void onEvent_Click()
{
	COM com_Chart
	anytype var_Chart
	var_Chart = exg2antt1.Chart()
	 com_Chart = var_Chart
		com_Chart.MarkNowColor(WinApi::RGB2int(255,0,0))
		com_Chart.MarkNow(com_Chart.DateFromPoint(-1,-1))
}

public void init()
{
	COM com_Chart

	anytype var_Chart

	super()

	var_Chart = exg2antt1.Chart()
	 com_Chart = var_Chart
		com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("3/13/2012",213)))
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,0);
		com_Chart.LevelCount(2)
		com_Chart.MarkNowColor(WinApi::RGB2int(0,0,0))
		com_Chart.MarkNowWidth(3)
		com_Chart.UnitWidth(32)
		com_Chart.ResizeUnitScale(65536/*exHour*/)

}

/*
public void activate(boolean _active)
{
	super(_active)


	exg2antt1.Chart().PaneWidth(false,0)

}
*/
VFP  
*** Click event - Occurs when the user presses and then releases the left mouse button over the tree control. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Chart
			.MarkNowColor = RGB(255,0,0)
			.MarkNow = .DateFromPoint(-1,-1)
		endwith
	endwith

with thisform.G2antt1
	with .Chart
		.FirstVisibleDate = {^2012-3-13}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.MarkNowColor = RGB(0,0,0)
		.MarkNowWidth = 3
		.UnitWidth = 32
		.ResizeUnitScale = 65536
	endwith
endwith
dBASE Plus  
/*
with (this.ACTIVEX1.nativeObject)
	Click = class::nativeObject_Click
endwith
*/
// Occurs when the user presses and then releases the left mouse button over the tree control.
function nativeObject_Click()
	local oG2antt,var_Chart
	oG2antt = form.Activex1.nativeObject
	var_Chart = oG2antt.Chart
		var_Chart.MarkNowColor = 0xff
		var_Chart.MarkNow = var_Chart.DateFromPoint(-1,-1)
return

local oG2antt,var_Chart

oG2antt = form.Activex1.nativeObject
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = "03/13/2012"
	// var_Chart.PaneWidth(false) = 0
	with (oG2antt)
		TemplateDef = [Dim var_Chart]
		TemplateDef = var_Chart
		Template = [var_Chart.PaneWidth(false) = 0]
	endwith
	var_Chart.LevelCount = 2
	var_Chart.MarkNowColor = 0x0
	var_Chart.MarkNowWidth = 3
	var_Chart.UnitWidth = 32
	var_Chart.ResizeUnitScale = 65536
XBasic (Alpha Five)  
function Click as v ()
	Dim oG2antt as P
	Dim var_Chart as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Chart = oG2antt.Chart
		var_Chart.MarkNowColor = 255
		var_Chart.MarkNow = var_Chart.DateFromPoint(-1,-1)
end function

Dim oG2antt as P
Dim var_Chart as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {03/13/2012}
	' var_Chart.PaneWidth(.f.) = 0
	oG2antt.TemplateDef = "Dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 0"

	var_Chart.LevelCount = 2
	var_Chart.MarkNowColor = 0
	var_Chart.MarkNowWidth = 3
	var_Chart.UnitWidth = 32
	var_Chart.ResizeUnitScale = 65536
Delphi 8 (.NET only)  
procedure TWinForm1.AxG2antt1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxG2antt1 do
	begin
		with Chart do
		begin
			MarkNowColor := $ff
			MarkNow := TObject(DateFromPoint[-1,-1])
		end
	end
end;

with AxG2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '3/13/2012';
		PaneWidth[False] := 0;
		LevelCount := 2;
		MarkNowColor := $0;
		MarkNowWidth := 3;
		UnitWidth := 32;
		ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour;
	end;
end
Delphi (standard)  
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
	with G2antt1 do
	begin
		with Chart do
		begin
			MarkNowColor := $ff
			MarkNow := OleVariant(DateFromPoint[-1,-1])
		end
	end
end;

with G2antt1 do
begin
	with Chart do
	begin
		FirstVisibleDate := '3/13/2012';
		PaneWidth[False] := 0;
		LevelCount := 2;
		MarkNowColor := $0;
		MarkNowWidth := 3;
		UnitWidth := 32;
		ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
	end;
end
Visual Objects  
METHOD OCX_Exontrol1Click() CLASS MainDialog
	local var_Chart as IChart
	var_Chart := oDCOCX_Exontrol1:Chart
		var_Chart:MarkNowColor := RGB(255,0,0)
		var_Chart:MarkNow := var_Chart:[DateFromPoint,-1,-1]
RETURN NIL

local var_Chart as IChart

var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20120313")
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:MarkNowColor := RGB(0,0,0)
	var_Chart:MarkNowWidth := 3
	var_Chart:UnitWidth := 32
	var_Chart:ResizeUnitScale := exHour
PowerBuilder
/*begin event Click() - Occurs when the user presses and then releases the left mouse button over the tree control.*/
/*
	OleObject oG2antt,var_Chart
	oG2antt = ole_1.Object
	var_Chart = oG2antt.Chart
		var_Chart.MarkNowColor = RGB(255,0,0)
		var_Chart.MarkNow = var_Chart.DateFromPoint(-1,-1)
*/
/*end event Click*/

OleObject oG2antt,var_Chart

oG2antt = ole_1.Object
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = 2012-03-13
	var_Chart.PaneWidth(false,0)
	var_Chart.LevelCount = 2
	var_Chart.MarkNowColor = RGB(0,0,0)
	var_Chart.MarkNowWidth = 3
	var_Chart.UnitWidth = 32
	var_Chart.ResizeUnitScale = 65536