home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmSelectXData
- BorderStyle = 3 'Fixed Dialog
- Caption = "Select XData structure"
- ClientHeight = 2175
- ClientLeft = 1140
- ClientTop = 1515
- ClientWidth = 5190
- Height = 2580
- Left = 1080
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2175
- ScaleWidth = 5190
- Top = 1170
- Width = 5310
- Begin VB.CommandButton bClose
- Caption = "Close"
- Height = 375
- Left = 3840
- TabIndex = 3
- Top = 1440
- Width = 1095
- End
- Begin VB.CommandButton bDelete
- Caption = "Delete"
- Height = 375
- Left = 3840
- TabIndex = 2
- Top = 840
- Width = 1095
- End
- Begin VB.CommandButton bOK
- Caption = "View"
- Default = -1 'True
- Height = 375
- Left = 3840
- TabIndex = 1
- Top = 240
- Width = 1095
- End
- Begin VB.ListBox XDataList
- Height = 1620
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 3255
- End
- Attribute VB_Name = "frmSelectXData"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub bClose_Click()
- 'Quit and don't display any X-Data items
- m_quitting = True
- Unload frmSelectXData
- End Sub
- Private Sub bDelete_Click()
- 'delete selected X-Data structure
- Dim i As Long
- Dim response As Long
- i = XDataList.ListIndex
- If i > -1 Then
- response = MsgBox("Do you really want to delete this X-Data structure?", vbYesNo + vbQuestion)
- If response = vbYes Then
- If BaseFrm.Amoeba.X_DeleteData(pEntity, XDataList.ItemData(i)) = -1 Then
- MsgBox "Could not delete X-Data structure", vbExclamation
- Else
- XDataList.RemoveItem (i)
- If XDataList.ListCount = 0 Then
- Unload frmSelectXData
- End If
- End If
- End If
- End If
- End Sub
- Private Sub bOK_Click()
- pStruct = XDataList.ItemData(XDataList.ListIndex)
- If XDataList.ListCount > 1 Then
- m_quitting = False
- Else
- 'no X-Data structure left, so quit
- m_quitting = True
- End If
- Unload frmSelectXData
- End Sub
- Private Sub Form_Activate()
- frmSelectXData.SetFocus
- End Sub
- Private Sub Form_Load()
- Dim i As Long
- Dim description As String
- m_quitting = True
- i = 0
- 'load all X-Data descriptions
- Do While BaseFrm.Amoeba.X_GetStruct(pEntity, i, pStruct) <> -1
- i = i + 1
- If BaseFrm.Amoeba.X_GetDesc(pStruct, description) = -1 Then
- BaseFrm.Prompt "Could not read X-Data description"
- Unload frmSelectXData
- End If
- frmSelectXData.XDataList.AddItem description
- frmSelectXData.XDataList.ItemData(XDataList.NewIndex) = pStruct
- Loop
- XDataList.ListIndex = 0
- End Sub
- Private Sub XDataList_DblClick()
- bOK_Click
- End Sub
-