event BarResizing (Item as HITEM, Key as Variant)
Occurs when a bar is moving or resizing.

TypeDescription
Item as HITEM A long expression that specifies the item that hosts the bar being moved or resized.
Key as Variant A VARIANT expression that specifies the bar being moved or resized.
The BarResizing event is fired continually while the bar is resizing or moving. The BarResize event notifies the application once the bar is moved or resized. The ChartStartChaning(exMoveBar) event notifies the application once the user starts moving a bar, while the ChartEndChaning(exMoveBar) notifies the application once the user moved the bar. The ChartStartChaning(exResizeStartBar) or ChartStartChaning(exResizeEndBar) event notifies the application once the user starts resizing a bar, while the ChartEndChaning( exResizeStartBar) or ChartEndChaning(exResizeEndBar) notifies the application once the user resized the bar.

Use the ItemBar(exBarStart) and ItemBar(exBarEnd)/ItemBar(exBarEndInclusive) properties to determine the start and end point of the bar being moved or resized. Use the ItemBar(exBarDuration) and ItemBar(exBarDurationPrev) properties to determine the duration after resizing, and before the bar being resized, so you can determine whether the user resizes or moves a bar. 

Syntax for BarResizing event, /NET version, on:

private void BarResizing(object sender,int Item,object Key)
{
}

Private Sub BarResizing(ByVal sender As System.Object,ByVal Item As Integer,ByVal Key As Object) Handles BarResizing
End Sub

Syntax for BarResizing event, /COM version, on:

private void BarResizing(object sender, AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent e)
{
}

void OnBarResizing(long Item,VARIANT Key)
{
}

void __fastcall BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key)
{
}

procedure BarResizing(ASender: TObject; Item : HITEM;Key : OleVariant);
begin
end;

procedure BarResizing(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent);
begin
end;

begin event BarResizing(long Item,any Key)
end event BarResizing

Private Sub BarResizing(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent) Handles BarResizing
End Sub

Private Sub BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal Key As Variant)
End Sub

Private Sub BarResizing(ByVal Item As Long,ByVal Key As Variant)
End Sub

LPARAMETERS Item,Key

PROCEDURE OnBarResizing(oG2antt,Item,Key)
RETURN

Syntax for BarResizing event, /COM version (others), on:

<SCRIPT EVENT="BarResizing(Item,Key)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function BarResizing(Item,Key)
End Function
</SCRIPT>

Procedure OnComBarResizing HITEM llItem Variant llKey
	Forward Send OnComBarResizing llItem llKey
End_Procedure

METHOD OCX_BarResizing(Item,Key) CLASS MainDialog
RETURN NIL

void onEvent_BarResizing(int _Item,COMVariant _Key)
{
}

function BarResizing as v (Item as OLE::Exontrol.G2antt.1::HITEM,Key as A)
end function

function nativeObject_BarResizing(Item,Key)
return

The following VB sample moves the bar in a second gantt control once the user resizes or moves a bar in the first gantt control:

Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
    With G2antt2
        .BeginUpdate
        .Items.AddBar .Items.ItemByIndex(G2antt1.Items.ItemToIndex(Item)), G2antt1.Items.ItemBar(Item, Key, exBarName), G2antt1.Items.ItemBar(Item, Key, exBarStart), G2antt1.Items.ItemBar(Item, Key, exBarEnd)
        .EndUpdate
    End With
End Sub

The sample uses the AddBar method instead ItemBar, so the start and end points of the bar are updated once.

If using the SchedulePDM method during a BarResizing event, you can see the order of the events in the following VB sample:

Private Sub G2antt1_BarResize(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
    Debug.Print "BarResize invoked"
End Sub

Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant)
    Debug.Print "BarResizing invoked"
    G2antt1.Items.SchedulePDM Item, Key
End Sub

Private Sub G2antt1_ChartStartChanging(ByVal Operation As EXG2ANTTLibCtl.BarOperationEnum)
    If (Operation = exPDM) Then
        Debug.Print "SchedulePDM starts"
    End If
End Sub

Private Sub G2antt1_ChartEndChanging(ByVal Operation As EXG2ANTTLibCtl.BarOperationEnum)
    If (Operation = exPDM) Then
        Debug.Print "SchedulePDM ends"
    End If
End Sub

The output shows as follows:   

BarResizing invoked
SchedulePDM starts
	BarResize invoked
	BarResize invoked
SchedulePDM ends
BarResize invoked