home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Bible_Conc837805162002.psc / Form4.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-02-10  |  3.9 KB  |  139 lines

  1. VERSION 5.00
  2. Begin VB.Form Form4 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Form4"
  5.    ClientHeight    =   4380
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4455
  9.    LinkTopic       =   "Form4"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   4380
  12.    ScaleWidth      =   4455
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.CommandButton Command3 
  15.       Caption         =   "Cancel"
  16.       Height          =   375
  17.       Left            =   3000
  18.       TabIndex        =   5
  19.       Top             =   3840
  20.       Width           =   1335
  21.    End
  22.    Begin VB.CommandButton Command2 
  23.       Caption         =   "Add Scripure"
  24.       Height          =   375
  25.       Left            =   1560
  26.       TabIndex        =   4
  27.       Top             =   3840
  28.       Width           =   1335
  29.    End
  30.    Begin VB.TextBox Text3 
  31.       Height          =   645
  32.       Left            =   3840
  33.       MultiLine       =   -1  'True
  34.       TabIndex        =   3
  35.       Top             =   1800
  36.       Visible         =   0   'False
  37.       Width           =   1335
  38.    End
  39.    Begin VB.CommandButton Command1 
  40.       Caption         =   "Save Changes"
  41.       Height          =   375
  42.       Left            =   120
  43.       TabIndex        =   2
  44.       Top             =   3840
  45.       Width           =   1335
  46.    End
  47.    Begin VB.TextBox Text2 
  48.       Height          =   1575
  49.       Left            =   120
  50.       MultiLine       =   -1  'True
  51.       ScrollBars      =   2  'Vertical
  52.       TabIndex        =   1
  53.       Top             =   1920
  54.       Width           =   4215
  55.    End
  56.    Begin VB.TextBox Text1 
  57.       Height          =   1695
  58.       Left            =   120
  59.       MultiLine       =   -1  'True
  60.       ScrollBars      =   2  'Vertical
  61.       TabIndex        =   0
  62.       Top             =   120
  63.       Width           =   4215
  64.    End
  65. Attribute VB_Name = "Form4"
  66. Attribute VB_GlobalNameSpace = False
  67. Attribute VB_Creatable = False
  68. Attribute VB_PredeclaredId = True
  69. Attribute VB_Exposed = False
  70. Private Sub Command1_Click()
  71. Open Curpath & "\" + "des.dat" For Output As #1
  72. Print #1, Text1.Text
  73. Close #1
  74. Open Curpath & "\" + "des.html" For Output As #1
  75. Print #1, Text1.Text
  76. Close #1
  77. Open Curpath & "\" + "script.dat" For Output As #1
  78. Print #1, Text2.Text
  79. Close #1
  80. Text3 = Text3 & "<table bgcolor=""lightgrey""><tr><td>"
  81. Open Curpath & "\" + "script.dat" For Input As #1
  82. CountStuff = 0
  83. Do Until EOF(1)
  84. CountStuff = CountStuff + 1
  85. Line Input #1, lineoftext
  86. If lineoftext = "<!--new-->" Then
  87. Text3 = Text3 & "</td></tr></table><br><br>"
  88. Text3 = Text3 & "<table bgcolor=""lightgrey""><tr><td>"
  89. CountStuff = 10
  90. End If
  91. If CountStuff = 1 Then
  92. Text3 = Text3 & "<b>Book: </b>" & lineoftext & "</td></tr>"
  93. ElseIf CountStuff = 2 Then
  94. Text3 = Text3 & "<tr><td><b>Chapter: </b>" & lineoftext & "</td></tr>"
  95. ElseIf CountStuff = 3 Then
  96. Text3 = Text3 & "<tr><td><b>Versus: </b>" & lineoftext & "</td></tr></table><br><table bgcolor=""lightgrey""><tr><td>"
  97. ElseIf CountStuff = 4 Then
  98. Text3 = Text3 & lineoftext & "<div style=""margin-left : 40px;"" >"
  99. ElseIf CountStuff = 5 Then
  100. Text3 = Text3 & lineoftext & "</div>"
  101. CountStuff = 3
  102. ElseIf CountStuff = 10 Then
  103. CountStuff = 0
  104. End If
  105. Close #1
  106. Text3 = Text3 & "</td></tr></table>"
  107. Open Curpath & "script.html" For Output As #1
  108. Print #1, Text3.Text
  109. Close #1
  110. Unload Me
  111. End Sub
  112. Private Sub Command2_Click()
  113. Form3.Show
  114. End Sub
  115. Private Sub Command3_Click()
  116. Unload Me
  117. End Sub
  118. Private Sub Form_Load()
  119. wf = 2
  120. Close #1
  121. Open Curpath & "des.dat" For Input As #1
  122. Do Until EOF(1)
  123. Line Input #1, textline
  124. All = All & textline & vbNewLine
  125. Close #1
  126. Text1 = All
  127. Close #1
  128. All = ""
  129. Open Curpath & "script.dat" For Input As #1
  130. Do Until EOF(1)
  131. Line Input #1, textline
  132. All = All & textline & vbNewLine
  133. Close #1
  134. Text2 = All
  135. End Sub
  136. Private Sub Form_Unload(Cancel As Integer)
  137. wf = 1
  138. End Sub
  139.