Q&A

  • ActiveX에서 비베 -> 델파이로...
Dim StccObj As New STCCOrders
Dim WithEvents ActiveObj As ActiveOrders
Dim WithEvents OpenObj As OpenPositions
Dim WithEvents FilledObj As FilledOrders
Dim WithEvents CanceledObj As CanceledOrders


Private Sub UserControl_Initialize()

Set ActiveObj = StccObj.ActiveOrders
Set OpenObj = StccObj.OpenPositions
Set FilledObj = StccObj.FilledOrders
Set CanceledObj = StccObj.CanceledOrders

End Sub

Private Sub SendOrders_Click()
    
    Select Case SSTab1.Tab
        
        Case 0
            AddActiveOrder
          
        Case 1
            AddOpenPosition
        
        Case 2
            AddFilledOrder
        
        Case 3
            AddCanceledOrder
            
    End Select
        
    
End Sub

Sub AddActiveOrder()

    ActiveObj.Add ASymbolText.Text, ADescriptionText.Text, AOrderTypeText.Text, AOrderText.Text, ALastPriceText.Text, 101, Now, ASystemText.Text, ASignalText.Text, AWorkspaceText.Text, AIntervalText.Text, APositionNumberText.Text, AOrderNumberText.Text, hWnd, 1, AAlertStringText.Text

End Sub

Sub AddOpenPosition()
    
    OpenObj.Add OSymbolText.Text, ODescriptionText.Text, OEntryPriceText.Text, 101, OLastPriceText.Text, 101, OProfitPriceText.Text, 101, Now, OSystemText.Text, OSignalText.Text, OWorkspaceText.Text, OIntervalText.Text, OPositionNumberText.Text, OOrderNumberText.Text, hWnd, 1, OAlertStringText.Text
    
End Sub

Sub AddFilledOrder()

    FilledObj.Add FSymbolText.Text, FDescriptionText.Text, FOrderTypeText.Text, FOrderText.Text, FFilledPriceText.Text, 101, FSlippagePriceText.Text, 101, Now, Now, FSystemText.Text, FSignalText.Text, FWorkspaceText.Text, FIntervalText.Text, FPositionNumberText.Text, FOrderNumberText.Text, hWnd, 1, FAlertStringText.Text

End Sub

Sub AddCanceledOrder()

    CanceledObj.Add CSymbolText.Text, CDescriptionText.Text, COrderTypeText.Text, COrderText.Text, Now, Now, CSystemText.Text, CSignalText.Text, CWorkspaceText.Text, CIntervalText.Text, CPositionNumberText.Text, COrderNumberText.Text, CCanceledNumberText.Text, hWnd, 1, CAlertStringText.Text

End Sub

Private Sub ActiveObj_Add(ByVal pDisp As Object)
    
    Dim ActOrder As ActiveOrder
    Set ActOrder = pDisp
    
    AEventList.AddItem "ActiveOrder Event -----"
    AEventList.AddItem ActOrder.Symbol
    AEventList.AddItem ActOrder.Description
    AEventList.AddItem ActOrder.System
    AEventList.AddItem ActOrder.Signal
    AEventList.AddItem ActOrder.OrderNumber
      
End Sub

Private Sub OpenObj_Add(ByVal pDisp As Object)
    
    Dim OpenPos As OpenPosition
    Set OpenPos = pDisp
    
    OEventList.AddItem "OpenPosition Event -----"
    OEventList.AddItem OpenPos.Symbol
    OEventList.AddItem OpenPos.Description
    OEventList.AddItem OpenPos.System
    OEventList.AddItem OpenPos.Signal
    OEventList.AddItem OpenPos.OrderNumber
    
End Sub
Private Sub FilledObj_Add(ByVal pDisp As Object)
    
    Dim FillOrd As FilledOrder
    Set FillOrd = pDisp
    
    FEventList.AddItem "FilledOrder Event -----"
    FEventList.AddItem FillOrd.Symbol
    FEventList.AddItem FillOrd.Description
    FEventList.AddItem FillOrd.System
    FEventList.AddItem FillOrd.Signal
    FEventList.AddItem FillOrd.OrderNumber
    
End Sub
Private Sub CanceledObj_Add(ByVal pDisp As Object)

    Dim CanOrd As CanceledOrder
    Set CanOrd = pDisp
    
    CEventList.AddItem "CancelOrder Event -----"
    CEventList.AddItem CanOrd.Symbol
    CEventList.AddItem CanOrd.Description
    CEventList.AddItem CanOrd.System
    CEventList.AddItem CanOrd.Signal
    CEventList.AddItem CanOrd.OrderNumber

End Sub



위 비베 코드를 옮겨야 되는데

CanceledObj_Add(ByVal pDisp As Object)

가 뭔지 잘 모르겠습니다.  고수님들의 도움이 필요합니다..
0  COMMENTS