home *** CD-ROM | disk | FTP | other *** search
-
- DEFINT A-Z
-
- DIM SHARED File_LNG% ' Filehandle of Language-file
-
- DECLARE SUB StartLNG ()
- DECLARE FUNCTION Message$ (BYVAL Index&)
-
- FUNCTION Message$ (BYVAL Index&)
-
- IF Index& > 5 THEN
- GET File_LNG%, (Index& * 4) + 401, xpos& ' get position of string
- GET File_LNG%, xpos&, x% ' get length of string
- ELSE
- x% = 78
- xpos& = (Index& - 1) * 80 - 1
- END IF
-
- a$ = SPACE$(x%)
- GET File_LNG%, xpos& + 2, a$ ' and read the string
-
- IF Index& > 5 THEN
- ' ┼┼┼
- ' here you must de-encrypt the string, if you did encrypt it in
- ' FORM1:OptimizeFile_Click
- END IF
-
- Message$ = LTRIM$(RTRIM$(a$))
-
- END FUNCTION
-
- SUB StartLNG ()
-
- Name_LNG$ = "filename.lng" ' change this to your filename,
- ' in my apps. Name_LNG$ is common
- ' shared, so I can change it at runtime
-
- IF DIR$(Name_LNG$) <> "" THEN
- File_LNG% = FREEFILE
- OPEN Name_LNG$ FOR BINARY AS File_LNG%
- ELSE
- BEEP
- MSGBOX "Error with languagefile"
- END
- END IF
-
- END SUB
-
-