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.

frmDicoHebreu - 1<br />

'Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _<br />

'(ByVal hwndCaller As Long, ByVal pszFile As String, _<br />

'ByVal uCommand As Long, ByVal dwData As Long) As Long<br />

'Dim robby As IAgentCtlCharacterEx<br />

'Const DATAPATH = "robby.acs"<br />

Private Sub btnAjouter_Click()<br />

' au cas où<br />

Close<br />

Dim lexique$, lfile, hebreu$, prononciation$, francais$, notes$<br />

lexique = App.Path & "\tools\lexiqueheb.dic"<br />

lfile = FreeFile<br />

'définitions des variables<br />

hebreu = txtHebreu.Text<br />

prononciation = txtPrononciation.Text<br />

francais = txtFrancais.Text<br />

notes = txtNotes.Text<br />

' attention VB ne gère pas les virgules & les guilleemnts<br />

francais = Replace(francais, ",", "~", 1, , vbTextCompare)<br />

notes = Replace(notes, ",", "~", 1, , vbTextCompare)<br />

notes = Replace(notes, Chr$(51), "'", 1)<br />

' ouverture du lexique pour écriture<br />

Open lexique For Append As #lfile<br />

rite #lfile, hebreu & "1/" & prononciation & "2/" & francais & "3/" & notes<br />

lose<br />

tnEffacer_Click<br />

nd Sub<br />

rivate Sub btnEscape_Click()<br />

nload Me<br />

nd Sub<br />

rivate Sub btnEffacer_Click()<br />

xtHebreu.Text = ""<br />

xtPrononciation.Text = ""<br />

xtFrancais.Text = ""<br />

xtNotes.Text = ""<br />

imer1.Enabled = False<br />

nd Sub<br />

rivate Sub btnFermer_Click()<br />

robby.Hide 0<br />

nload Me<br />

nd Sub<br />

rivate Sub btnGo_Click()<br />

im hebreu$, prononciation$, francais$, notes$, recherche$, mot$<br />

définitions des variables<br />

ebreu = txtHebreu.Text<br />

rononciation = txtPrononciation.Text<br />

rancais = txtFrancais.Text<br />

otes = txtNotes.Text<br />

gestion erreurs<br />

f txtHebreu.Text = "" And _<br />

xtFrancais.Text = "" Then<br />

file = MsgBox("Vous n'avez pas saisi votre recherche !", vbExclamation, "Rechercher un mot")<br />

xit Sub<br />

nd If<br />

Par défaut la recherche est EXACTE<br />

détermination du mot-clé à chercher dans le lexique<br />

je cherche un mot HEBREU<br />

f txtFrancais.Text = "" Then 'And _<br />

'txtPrononciation.Text = "" And _<br />

'txtNotes.Text = "" Then

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

Saved successfully!

Ooh no, something went wrong!