⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 这个代码却能真正教会电脑进行像人那样思考
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmMain 
   BackColor       =   &H00C0C0C0&
   Caption         =   "General Search"
   ClientHeight    =   6150
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   9420
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   6150
   ScaleWidth      =   9420
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtSearch 
      Height          =   405
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   3615
   End
   Begin VB.CommandButton cmdSearch 
      Height          =   375
      Left            =   3720
      TabIndex        =   2
      Top             =   360
      Width           =   375
   End
   Begin VB.ListBox lstResult 
      BackColor       =   &H00E0E0E0&
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   5190
      Left            =   0
      TabIndex        =   1
      Top             =   960
      Width           =   9375
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "Search keywords"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   3615
   End
   Begin VB.Image Image1 
      Height          =   810
      Left            =   4560
      Picture         =   "frmMain.frx":0742
      Stretch         =   -1  'True
      Top             =   120
      Width           =   4860
   End
   Begin VB.Shape Shape1 
      FillColor       =   &H00FFFFFF&
      FillStyle       =   0  'Solid
      Height          =   975
      Left            =   0
      Top             =   0
      Width           =   9495
   End
   Begin VB.Menu mnuFile 
      Caption         =   "File"
      Begin VB.Menu mnuImport 
         Caption         =   "Import Open Mind Data"
      End
      Begin VB.Menu mnuBlank 
         Caption         =   "-"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "Exit"
      End
   End
   Begin VB.Menu mnuQuestion 
      Caption         =   "Question"
      Begin VB.Menu mnuRelationships 
         Caption         =   "Ask a question"
      End
      Begin VB.Menu mnuAnalyse 
         Caption         =   "Analyse a sentance"
      End
   End
   Begin VB.Menu mnuTeach 
      Caption         =   "Teach"
      Begin VB.Menu mnuAddKnowledge 
         Caption         =   "Add Knowledge"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim OM As New ClassOpenMind



Private Sub cmdSearch_Click()
  Me.MousePointer = 11
  Call OM.getKnowledge(txtSearch, lstResult)
  Me.MousePointer = 0
End Sub


Private Sub Form_Load()
  'Call OM.readOpenMind(App.Path & "\data\isa")
End Sub

Private Sub mnuAddKnowledge_Click()
  frmTeach.Show
End Sub

Private Sub mnuAnalyse_Click()
  frmAnalyse.Show
End Sub

Private Sub mnuExit_Click()
  End
End Sub



Private Sub mnuImport_Click()
  Me.MousePointer = 11
  'Call OM.ReadObjectAction(App.Path & "\data\isfor", " is for ", "purpose")
  'Call OM.ReadObjectAction(App.Path & "\data\usedfor", " is used for ", "purpose")
  'Call OM.ReadObjectAction(App.Path & "\data\usedto", " is used to ", "purpose")
  'Call OM.ReadObjectAction(App.Path & "\data\usedin", " is used in ", "usedin")
  'Call OM.ReadObjectProperties(App.Path & "\data\requires", " requires ", "requires")
  
  'Call OM.ReadObjectProperties(App.Path & "\data\means", " means ", "means")
  
  'Call OM.ReadComparissonBetweenObjectAndAction(App.Path & "\data\youcanuse", "you can use", " to ", "usage")
  'Call OM.ReadComparissonBetweenObjects(App.Path & "\data\findin", "you often find", " in ", "inside")
  'Call OM.ReadComparissonBetweenObjects(App.Path & "\data\somethingyoufind", "something you find", " is ", "inside")
  'Call OM.ReadComparissonBetweenObjects(App.Path & "\data\somewherecanbe", "somewhere", " can be is ", "location")
  
  'Call OM.ReadComparrisonWithReason(App.Path & "\data\differences", "difference between", ": ", "different")
  'Call OM.ReadComparrisonWithReason(App.Path & "\data\differencebetween2", "difference between", ": ", "different")
  'Call OM.ReadComparrisonWithReason(App.Path & "\data\differencebetween", "a difference between", " is ", "different")
  'Call OM.ReadComparrisonWithReason(App.Path & "\data\similarity", "similarity Between", ": ", "similar")
  
  'actions
  'Call OM.ReadComparissonBetweenObjectAndAction(App.Path & "\data\activity", "an activity", " can do is ", "cando")
  'Call OM.ReadComparissonBetweenActions(App.Path & "\data\consequence", "a consequence of", " is ", "consequence")
  'Call OM.ReadComparissonBetweenActions(App.Path & "\data\firstthingyoudo", "the first thing you do when you when you", " is ", "after")
  'Call OM.ReadComparissonBetweenActions(App.Path & "\data\needtodobefore", "something you need to do before", " is ", "after")
  
  'Call OM.ReadPerson(App.Path & "\data\personwants", "a person wants", "wants")
  'Call OM.ReadPerson(App.Path & "\data\persondoesnotwant", "a person does not want", "notwants")
  
  'Call OM.ReadTwoObjects(App.Path & "\data\misc2", " is ", "is")
  'Call OM.ReadTwoObjects(App.Path & "\data\isa", " is a ", "isa")
  
  ''Call OM.ReadStatements(App.Path & "\data\statementistrue", "the statement", " is true because ", "because")
    
  'Call OM.ReadComparissonBetweenStatements(App.Path & "\data\anotherway", "another way to say", " is ", "alternative")
  'Call OM.ReadComparissonBetweenActions(App.Path & "\data\ifyouwant", "if you want", " then you should ", "effect")
  'Call OM.ReadComparissonBetweenActions(App.Path & "\data\mighthappenwhen", "something that might happen when you", " is ", "possibleeffect")
  'Call OM.ReadTwoObjects(App.Path & "\data\wouldmakeyouwant", " would make you want to ", "desire")
  
  'Call OM.ReadFirstNames(App.Path & "\data\male-names", True)
  'Call OM.ReadFirstNames(App.Path & "\data\female-names.txt", False)
    
  'Call OM.deriveTypes
  'Call OM.derivePastPresent
  
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\human.txt", "object", "partof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\absobj.txt", "object", "partof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\action.txt", "action", "partof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\attr.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\celest.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\chem.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\clothing.txt", "object", "typeof")
  
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\company.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\elec.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\enum.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\fooddrug.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\geog.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\ling.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\living.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\mediaobj.txt", "object", "typeof")
  
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\music.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\name.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\physics.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\physobj.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\relation.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\street.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\trans.txt", "object", "typeof")
  'Call OM.ReadThoughtTreasure(App.Path & "\data\TTreasure\tv.txt", "object", "typeof")
  Call OM.ReadFoundTogether(App.Path & "\data\thingsfoundtogether")
  
  'Call OM.derivePartOf
  'Call OM.deriveLocation
  'Call OM.deriveTypeOf
  'Call OM.derivePerson
  'Call OM.deriveListOfAttributes
  
  Me.MousePointer = 0
    
  lstResult.Clear
End Sub



Private Sub mnuRelationships_Click()
  frmQuestions.Show
End Sub

Private Sub txtSearch_KeyPress(KeyAscii As Integer)
  If (KeyAscii = 13) Then
    Call cmdSearch_Click
  End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -