15.07.2013 Views

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fctLireNTDF - 1<br />

Public Function LireNTDF(livre, chapitre, verset)<br />

Dim aouvrir$, recherche$, ligne$<br />

Dim lfile<br />

If livre = "Révélation" Then<br />

livre = "Apocalypse"<br />

ElseIf livre = "Lamentations" Then<br />

livre = "Lamentations de Jérémie"<br />

ElseIf livre = "Nahoum" Then<br />

livre = "Nahum"<br />

ElseIf livre = "Habaquq" Then<br />

livre = "Habakuk"<br />

End If<br />

' affectation variable<br />

aouvrir = App.Path & "\modules\DF\" & livre & ".txt"<br />

recherche = chapitre & "-" & verset & " "<br />

lfile = FreeFile<br />

frmBible.txtPassage.Text = ""<br />

On Error Resume Next<br />

Open aouvrir For Input As #lfile<br />

Do<br />

Input #lfile, ligne<br />

If Left(ligne, Len(recherche)) = recherche Then<br />

frmBible.txtPassage.Text = Mid(ligne, Len(recherche) + 1, Len(ligne))<br />

frmBible.txtPassage.Text = Replace(frmBible.txtPassage.Text, "~", ",", 1)<br />

End If<br />

Loop While Not EOF(lfile)<br />

Close<br />

nd Function

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!