home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / componen / interact / demo / data.2 / samples / vb / DBMODEL / MAIN.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-22  |  3.8 KB  |  128 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5370
  6.    ClientLeft      =   75
  7.    ClientTop       =   1770
  8.    ClientWidth     =   6690
  9.    Height          =   6060
  10.    Left            =   15
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5370
  15.    ScaleWidth      =   6690
  16.    ShowInTaskbar   =   0   'False
  17.    Top             =   1140
  18.    Width           =   6810
  19.    Begin PVIDO.InterAct InterAct1 
  20.       Height          =   4575
  21.       Left            =   240
  22.       TabIndex        =   0
  23.       Top             =   600
  24.       Width           =   6255
  25.       _Version        =   65541
  26.       _ExtentX        =   11033
  27.       _ExtentY        =   8070
  28.       _StockProps     =   1
  29.    End
  30.    Begin VB.Image Image4 
  31.       Height          =   270
  32.       Left            =   1680
  33.       Picture         =   "main.frx":0000
  34.       Top             =   120
  35.       Width           =   270
  36.    End
  37.    Begin VB.Image Image3 
  38.       Height          =   270
  39.       Left            =   1200
  40.       Picture         =   "main.frx":015A
  41.       Top             =   120
  42.       Width           =   270
  43.    End
  44.    Begin VB.Image Image2 
  45.       Height          =   270
  46.       Left            =   720
  47.       Picture         =   "main.frx":02B4
  48.       Top             =   120
  49.       Width           =   270
  50.    End
  51.    Begin VB.Image Image1 
  52.       Height          =   270
  53.       Left            =   240
  54.       Picture         =   "main.frx":040E
  55.       Top             =   120
  56.       Width           =   270
  57.    End
  58.    Begin VB.Menu File 
  59.       Caption         =   "File"
  60.       Begin VB.Menu PrintDiagram 
  61.          Caption         =   "Print"
  62.          Index           =   0
  63.       End
  64.    End
  65. Attribute VB_Name = "Form1"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68. Private Sub Command1_Click()
  69. End Sub
  70. Private Sub Form_Load()
  71. Rem hide the tools palette
  72. InterAct1.ToolsPalette = False
  73. Rem allow the IDO to be editable
  74. InterAct1.EditMode = True
  75.       
  76. Rem rules are not enforced in this diagram
  77. InterAct1.RulesEnforced = False
  78.       
  79. Rem turn off default menus of IDO
  80. InterAct1.PopupMenu(IDOMENU_INTERACT) = False
  81. InterAct1.PopupMenu(IDOMENU_ENTITY) = False
  82. InterAct1.PopupMenu(IDOMENU_RELATION) = False
  83.       
  84. Rem configure the classes for the diagram
  85. InterAct1.ResetPalette
  86. InterAct1.ReadPalette ("c:/pvapps/interact/samples/basic/dbmodel/dbmodel.plt")
  87. Rem hide the tools palette
  88. InterAct1.ToolsPalette = False
  89. End Sub
  90. Private Sub IDO1_RelationAddRequest(Status As Long)
  91. Dim ret As Integer
  92. ret = MsgBox("Add Relation?", vbYesNo)
  93. If (ret = vbNo) Then
  94.    Status = 1
  95. End If
  96. End Sub
  97. Private Sub Image1_Click()
  98.       
  99. InterAct1.DragAddEntity "entity1"
  100. End Sub
  101. Private Sub Image2_Click()
  102.       
  103. InterAct1.DragAddEntity "entity2"
  104. End Sub
  105. Private Sub Image3_Click()
  106.       
  107. InterAct1.DragAddRelation "link1"
  108. End Sub
  109. Private Sub Image4_Click()
  110.       
  111. InterAct1.DragAddRelation "link2"
  112. End Sub
  113. Private Sub InterAct1_EntityAddRequest(ID As Long, Name As String, ClassName As String, Text As String, Top As Integer, Bottom As Integer, Left As Integer, Right As Integer, Status As Long)
  114. Rem show a modal form
  115. Form2.Show 1
  116. Text = Form2.Text.Text
  117. End Sub
  118. Private Sub InterAct1_RelationAddRequest(ID As Long, Name As String, ClassName As String, Text As String, ByVal SourceEntity As Object, ByVal DestinationEntity As Object, Status As Long)
  119. Dim ret As Integer
  120. ret = MsgBox("Are your sure you want to add this relation?", vbYesNo)
  121. If (ret = vbNo) Then
  122.    Status = 1
  123. End If
  124. End Sub
  125. Private Sub PrintDiagram_Click(Index As Integer)
  126. InterAct1.PrintDiagram
  127. End Sub
  128.