$OPTIMIZE ON
$TYPECHECK ON
$APPTYPE GUI
$INCLUDE "RAPIDQ.INC"
$INCLUDE "QABOUT.INC"
$OPTION ICON "SimpleEdit.ico"
DECLARE FUNCTION SetFocus LIB "user32" ALIAS "SetFocus" (BYVAL hwnd AS LONG) AS LONG
DECLARE FUNCTION SendMessageA LIB "user32" ALIAS "SendMessageA" (hwnd AS LONG, wMsg AS LONG, wParam AS LONG, pf AS LONG) AS LONG
Public CONST EM_UNDO = &HC7
TYPE QREdit EXTENDS QRICHEDIT
RichFont AS QFONT
CONSTRUCTOR
PlainText = True
RichFont.Name = "Arial"
RichFont.Size = 10
Font = QREdit.RichFont
END CONSTRUCTOR
END TYPE
DECLARE SUB Form_load
DECLARE SUB mnuNew_Click (Sender AS QMENUITEM)
DECLARE SUB mnuOpen_Click (Sender AS QMENUITEM)
DECLARE SUB mnuSave_Click (Sender AS QMENUITEM)
DECLARE SUB mnuSaveAs_Click (Sender AS QMENUITEM)
DECLARE SUB mnuPrint_Click (Sender AS QMENUITEM)
DECLARE SUB mnuExit_Click (Sender AS QMENUITEM)
DECLARE SUB mnuUndo_Click (Sender AS QMENUITEM)
DECLARE SUB mnuCut_Click (Sender AS QMENUITEM)
DECLARE SUB mnuCopy_Click (Sender AS QMENUITEM)
DECLARE SUB mnuPaste_Click (Sender AS QMENUITEM)
DECLARE SUB mnuSelectAll_Click (Sender AS QMENUITEM)
DECLARE SUB mnuDelete_Click (Sender AS QMENUITEM)
DECLARE SUB mnuClear_Click (Sender AS QMENUITEM)
DECLARE SUB Search (Sender AS QMENUITEM)
DECLARE SUB Language
DECLARE SUB mnuEnglishUS_Click (Sender AS QMENUITEM)
DECLARE SUB mnuPortugueseBrazilian_Click (Sender AS QMENUITEM)
DECLARE SUB mnuSpanishColumbia_Click (Sender AS QMENUITEM)
DECLARE SUB mnuAbout_Click (Sender AS QMENUITEM)
DECLARE SUB Radio
DECLARE SUB FileTab_Change(Sender AS QTABCONTROL)
DECLARE SUB TabClose_Click(Shift AS WORD, Sender AS QTABCONTROL)
DECLARE SUB Find(Sender AS QBUTTON)
DECLARE SUB Show_Hint (Hint AS STRING)
DECLARE SUB Sync
DIM OD AS QOPENDIALOG
DIM SD AS QSAVEDIALOG
DIM File AS QFILESTREAM
DIM About AS QABOUT
DIM Source AS STRING
Source = "UNTITLED"
DIM Path AS STRING
Path = COMMAND$(0)-Application.ExeName
DIM FileName(100) AS STRING
Filename(0) = "Untitled"
DIM ActFile AS INTEGER
DIM Text(100) AS STRING
DIM t AS INTEGER
DIM newok AS INTEGER
DIM NewFile AS INTEGER
DIM FileCount AS INTEGER
CREATE SimpleEdit AS QFORM
Height = 600
OnHint = Show_Hint
OnShow = Form_load
Width = 800
Center
CREATE LangPanel AS QPANEL
Align = alTop
Alignment = taCenter
BevelInner = bvRaised
BevelOuter = bvNone
BorderStyle = 1
Font.Name = "Engravers MT"
Font.Size = 8
Font.COLOR = &HA00000
CAPTION = "Language"
Height = 65
PARENT = SimpleEdit
CREATE LangBox AS QCOMBOBOX
Align = alBottom
AddItems "EngLish (US)","Portuguese (Brazil)","Spanish (Colombia SUR)"
Font.Name = "Arial"
Font.Size = 10
Font.COLOR = &H804000
Text = LangBox.Item(0)
OnChange = Language
END CREATE
END CREATE
CREATE Toolbar AS QPANEL
Align = alTop
PARENT = SimpleEdit
CREATE cmdNew AS QCOOLBTN
Align = 3
BMP = "New.bmp"
Flat = 1
Hint = "New"
OnClick = mnuNew_Click
Width = 25
END CREATE
CREATE cmdOpen AS QCOOLBTN
Align = 3
BMP = "Open.bmp"
Flat = 1
Hint = "Open"
OnClick = mnuOpen_Click
Width = 25
END CREATE
CREATE cmdSave AS QCOOLBTN
Align = 3
BMP = "Save.bmp"
Flat = 1
Hint = "Save"
OnClick = mnuSave_Click
Width = 25
END CREATE
CREATE cmdPrint AS QCOOLBTN
Align = 3
BMP = "Print.bmp"
Flat = 1
Hint = "Print"
OnClick = mnuPrint_Click
Width = 25
END CREATE
CREATE cmdExit AS QCOOLBTN
Align = 3
BMP = "Exit.bmp"
Flat = 1
Hint = "Exit"
OnClick = mnuExit_Click
Width = 25
END CREATE
CREATE cmdUndo AS QCOOLBTN
Align = 3
BMP = "Undo.bmp"
Flat = 1
Hint = "Undo"
OnClick = mnuUndo_Click
Width = 25
END CREATE
CREATE cmdCut AS QCOOLBTN
Align = 3
BMP = "Cut.bmp"
Flat = 1
Hint = "Cut"
OnClick = mnuCut_Click
Width = 25
END CREATE
CREATE cmdCopy AS QCOOLBTN
Align = 3
BMP = "Copy.bmp"
Flat = 1
Hint = "Copy"
OnClick = mnuCopy_Click
Width = 25
END CREATE
CREATE cmdPaste AS QCOOLBTN
Align = 3
BMP = "Paste.bmp"
Flat = 1
Hint = "Paste"
OnClick = mnuPaste_Click
Width = 25
END CREATE
CREATE cmdSelectAll AS QCOOLBTN
Align = 3
BMP = "SelectAll.bmp"
Flat = 1
Hint = "SelectAll"
OnClick = mnuSelectAll_Click
Width = 25
END CREATE
CREATE cmdDelete AS QCOOLBTN
Align = 3
BMP = "Delete.bmp"
Flat = 1
Hint = "Delete"
OnClick = mnuSelectAll_Click
Width = 25
END CREATE
CREATE cmdClear AS QCOOLBTN
Align = 3
BMP = "Clear.bmp"
Flat = 1
Font.Name = "Courier New"
Font.Size = 10
Font.COLOR = &H800000
Hint = "Clear"
OnClick = mnuClear_Click
Width = 25
END CREATE
CREATE cmdFind AS QCOOLBTN
Align = 3
BMP = "Find.bmp"
Flat = 1
Font.Name = "Courier New"
Font.Size = 10
Font.COLOR = &H800000
Hint = "Find"
OnClick = Search
Width = 25
END CREATE
CREATE cmdAbout AS QCOOLBTN
Align = 3
BMP = "About.bmp"
Flat = 1
Font.Name = "Courier New"
Font.Size = 10
Font.COLOR = &H800000
Hint = "About"
OnClick = mnuAbout_Click
Width = 25
END CREATE
END CREATE
CREATE RichPanel AS QPANEL
Align = alClient
BevelInner = bvRaised
BevelOuter = bvRaised
PARENT = SimpleEdit
CREATE FileTab AS QTABCONTROL
Align = alClient
AddTabs Filename(0)
Enabled = 1
FocusButtons = 1
Font.Name = "Courier New"
Font.size = 10
HotTrack = True
Width = RichPanel.ClientWidth
Height = RichPanel.ClientHeight
OnChange = FileTab_Change
PARENT = RichPanel
END CREATE
CREATE CloseLabel AS QLABEL
ALign = alTop
Alignment = 1
Autosize = 1
CAPTION = "x"
Enabled = 1
Font.Name = "Engravers MT"
Font.Size = 10
Font.COLOR = clRed
Height = 25
Hint = "Close File"
LabelStyle = 2
Layout = 1
OnClick = TabClose_Click
PARENT = RichPanel
Width = 25
END CREATE
CREATE RichEdit AS QREdit
Align = alClient
HideSelection = 0
PARENT = FileTab
END CREATE
END CREATE
CREATE rftRuler AS QRICHEDIT
Align = alLeft
COLOR = &HCF9A9A
Font.Size = 10
Font.COLOR = 4259584
Left = RichEdit.Left - 35
Top = RichEdit.Top
Height = RichEdit.Height
Width = 35
END CREATE
CREATE Status1 AS QSTATUSBAR
Addpanels "",""
Panel(0).Width = 75
Panel(0).CAPTION = DATE$
Panel(1).Width = 100
Panel(1).CAPTION = Source
END CREATE
CREATE FindDlg AS QFORM
Height = 200
CAPTION = "Find Dialog"
BorderStyle = 3
FormStyle = 3
Center
CREATE FindBox AS QEDIT
Top = 10
Left = 15
PARENT = FindDlg
Width = 170
Height = 45
Tag = 1
END CREATE
CREATE FindLabel AS QLABEL
Top = 35
Left = 18
PARENT = FindDlg
Width = 50
CAPTION = "Find what word/s?"
END CREATE
CREATE FindButt AS QBUTTON
Top = 10
Left = 187
PARENT = FindDlg
Height = 22
Width = 111
CAPTION = "&Find"
Default = 1
OnClick = Find
END CREATE
CREATE Panel AS QPANEL
Top = 60
Left = 15
PARENT = FindDlg
Width = 283
Height = 3
END CREATE
CREATE ReplaceBox AS QEDIT
Top = 75
Left = 15
PARENT = FindDlg
Width = 170
Height = 45
END CREATE
CREATE ReplaceLabel AS QLABEL
Top = 100
Left = 18
PARENT = FindDlg
Width = 50
CAPTION = "Replace with what?"
END CREATE
CREATE ReplaceButt AS QBUTTON
Top = 75
Left = 187
PARENT = FindDlg
Height = 22
Width = 111
CAPTION = "&Replace"
Default = 1
OnClick = Find
END CREATE
CREATE ReplaceAButt AS QBUTTON
Top = 105
Left = 187
PARENT = FindDlg
Height = 22
Width = 111
CAPTION = "Replace&All"
Default = 1
OnClick = Find
END CREATE
CREATE RadioW AS QRADIOBUTTON
CAPTION = "Whole word"
Left = 140
PARENT = FindDlg
Top = 35
Checked = 1
OnClick = Radio
END CREATE
CREATE RadioP AS QRADIOBUTTON
CAPTION = "Part of word"
Left = 222
PARENT = FindDlg
Top = 35
OnClick = Radio
END CREATE
END CREATE
END CREATE
FOR t = 0 TO 200
rftRuler.Addstrings STR$(t)
NEXT t
$INCLUDE "SIMPLEMENU.INC"
SimpleEdit.SHOWMODAL
SUB mnuNew_Click
IF newok=0 THEN
Text(ActFile)=RichEdit.Text
RichEdit.Clear
RichEdit.Modified = False
INC(FileCount)
ActFile=FileCount
FileTab.AddTabs "Untitled"
FileTab.TabIndex=ActFile
NewFile=1
newok=1
END IF
END SUB
SUB mnuOpen_Click
OD.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
IF OD.EXECUTE THEN
Text(actFile)=RichEdit.Text
INC(FileCount)
actFile=FileCount
FileName(ActFile) = OD.FileName
FileTab.addTabs Filename(FileCount)
FileTab.TabIndex=ActFile
RichEdit.LoadFromFile FileName(ActFile)
RichEdit.Modified = 0
newfile=0
END IF
Status1.Panel(1).CAPTION = Filename(FileCount)
Sync
SetFocus(RichEdit.Handle)
FileTab.Hint = Filename(ActFile)
RichEdit.Modified = 0
END SUB
SUB mnuSave_Click
IF Source = "UNTITLED" THEN
mnuSaveAs_Click(Sender)
EXIT SUB
END IF
RichEdit.SaveToFile(Source)
RichEdit.Modified = 0
END SUB
SUB mnuSaveAs_Click
SD.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
IF SD.EXECUTE THEN
FileName(ActFile) = SD.FileName
IF FILEEXISTS(FileName(ActFile)) = 1 THEN
IF MESSAGEDLG(Source & CHR$(32) & "already exits, Overwrite?", mtWarning, mbYes OR mbNo,0) = mrYes THEN
RichEdit.SaveToFile(FileName(ActFile))
NewFile=0
RichEdit.Modified = 0
FileTab.Tab(actFile) = Filename(ActFile)
END IF
EXIT SUB
END IF
RichEdit.SaveToFile(FileName(ActFile))
NewFile=0
RichEdit.Modified = 0
FileTab.Tab(actFile) = Filename(ActFile)
END IF
Status1.Panel(1).CAPTION = Source
Sync
RichEdit.Modified = 0
END SUB
SUB mnuPrint_Click
IF RichEdit.Text = "" THEN
SHOWMESSAGE "There's nothing to print"
EXIT SUB
END IF
Printer.BeginDoc
Printer.TextOut(10, 10, RichEdit.Text, 0, -0)
Printer.EndDoc
END SUB
SUB mnuExit_Click
IF RichEdit.Modified = 1 THEN
IF MESSAGEDLG(Source & CHR$(32) & "Has been modified, Save Changes?", mtWarning, mbYes OR mbNo,0) = mrYes THEN
mnuSave_Click(Sender)
END IF
END IF
SimpleEdit.CLOSE
END SUB
SUB mnuUndo_Click
SendMessage RichEdit.Handle, EM_UNDO, 0, 0
END SUB
SUB mnuCut_Click
RichEdit.CutToClipboard
END SUB
SUB mnuCopy_Click
RichEdit.CopyToClipboard
END SUB
SUB mnuPaste_Click
RichEdit.PasteFromClipboard
END SUB
SUB mnuSelectAll_Click
RichEdit.SelectAll
END SUB
SUB mnuDelete_Click
RichEdit.SelText = ""
END SUB
SUB mnuClear_Click
IF MESSAGEDLG("This cannot be undone, proceed anyways?", mtWarning, mbYes, mbNo) = mrYes THEN
RichEdit.Clear
RichEdit.Modified = 1
END IF
END SUB
SUB Search
Finddlg.Visible = 1
END SUB
SUB Radio
SetFocus(FindBox.Handle)
END SUB
SUB Find(Sender AS QBUTTON)
DEFINT wherelast,diff
DEFLNG start, where,oldtext
DEFBYTE back
SELECT CASE Sender.Handle
CASE FindButt.Handle
FindButt.CAPTION = "Next"
back = 0
DO
where = INSTR(start,RichEdit.Text,FindBox.Text)
wherelast = where+LEN(FindBox.Text)
IF wherelast > LEN(RichEdit.Text) THEN DEC wherelast
IF where > 1 THEN
IF RadioW.Checked = 1 THEN
SELECT CASE MID$(RichEdit.Text,where-1,1)
CASE " ",CHR$(13),CHR$(10)
SELECT CASE MID$(RichEdit.Text,wherelast,1)
CASE " ",CHR$(13),CHR$(10),RIGHT$(FindBox.Text,1)
RichEdit.SelStart = where - 1
back = 0
CASE ELSE
start = where + LEN(FindBox.Text)
back = 1
END SELECT
CASE ELSE
start = where + LEN(FindBox.Text)
back = 1
END SELECT
ELSE
RichEdit.SelStart = where - 1
END IF
RichEdit.SelLength = LEN(FindBox.Text)
start = where + LEN(FindBox.Text)
ELSEIF where = 1 THEN
IF RadioW.Checked = 1 THEN
SELECT CASE MID$(RichEdit.Text,wherelast,1)
CASE " ",CHR$(13),CHR$(10)
RichEdit.SelStart = where - 1
back = 0
END SELECT
ELSE
RichEdit.SelStart = where - 1
END IF
RichEdit.SelLength = LEN(FindBox.Text)
start = where + LEN(FindBox.Text)
ELSE
SHOWMESSAGE "No more instances of " + FindBox.Text
start = 0
back = 0
END IF
LOOP UNTIL back = 0
CASE ReplaceButt.Handle
oldtext = RichEdit.Text
diff = LEN(ReplaceBox.Text) - LEN(FindBox.Text)
IF diff > 0 THEN
RichEdit.Text = INSERT$(SPACE$(diff),RichEdit.Text,where)
RichEdit.Text = REPLACE$(RichEdit.Text,ReplaceBox.Text,where)
ELSEIF diff < 0 THEN
RichEdit.Text = REPLACE$(RichEdit.Text,ReplaceBox.Text,where)
RichEdit.Text = DELETE$(RichEdit.Text,where+LEN(ReplaceBox.Text),ABS(SPACE$(diff)))
ELSE
RichEdit.Text = REPLACE$(RichEdit.Text,ReplaceBox.Text,where)
END IF
RichEdit.SelStart = where + LEN(ReplaceBox.Text) - 1
CASE ReplaceAButt.Handle
oldtext = RichEdit.Text
RichEdit.SelStart = RINSTR(RichEdit.Text,ReplaceBox.Text) + LEN(ReplaceBox.Text) -1
END SELECT
END SUB
SUB mnuAbout_Click
About.Appname = "SimpleEdit"
About.AppFont.Name = "Engravers MT"
About.AppFont.COLOR = 4194304
About.AppFont.Bold = 1
About.AppFont.Size = 14
About.Appversion = "0.1"
About.Email = "danny846842@yahoo.com"
About.Text = CHR$(13) + "Created by Danny Jackson" + CHR$(13) + CHR$(13) + "With special thanks to:" _
+ CHR$(13) + "Tito Livo Livotito_livio@yahoo.com," _
+ CHR$(13) + "Philippe DIZIER mecaniksoft@tiscali.fr," _
+ CHR$(13) + "Manuel Candela msca53@hotmail.com" _
+ CHR$(13) + "And all of my Friends at: AllProgramming, RapidQ Yahoo, RapidQWorks Yahoo" _
+ CHR$(13)
About.Show
END SUB
SUB Language
SELECT CASE LangBox.ItemIndex
CASE 0
LangBox.Text = LangBox.Item(0)
mnuEnglishUS_Click (QMENUITEM)
File.OPEN("Language.ini", fmCreate)
File.WriteLine LangBox.Item(0)
File.CLOSE
CASE 1
LangBox.Text = LangBox.Item(1)
mnuPortugueseBrazilian_Click (QMENUITEM)
File.OPEN("Language.ini", fmCreate)
File.WriteLine LangBox.Item(1)
File.CLOSE
CASE 2
LangBox.Text = LangBox.Item(2)
mnuSpanishColumbia_Click (QMENUITEM)
File.OPEN("Language.ini", fmCreate)
File.WriteLine LangBox.Item(2)
File.CLOSE
END SELECT
END SUB
SUB Form_load
File.OPEN("Language.ini", fmOpenRead)
WHILE File.Position < File.Size
LangBox.Text = File.Readline
WEND
File.CLOSE
SELECT CASE LangBox.Text
CASE "EngLish (US)"
mnuEnglishUS_Click (QMENUITEM)
CASE "Portuguese (Brazil)"
mnuPortugueseBrazilian_Click (QMENUITEM)
CASE "Spanish (Colombia SUR)"
mnuSpanishColumbia_Click (QMENUITEM)
END SELECT
END SUB
SUB mnuEnglishUS_Click
mnuAbout.CAPTION = "&About"
mnuAbout.Hint = "About"
cmdAbout.Hint = "About"
mnuClear.CAPTION = "&Clear"
mnuClear.Hint = "&Clear"
cmdClear.Hint = "&Clear"
mnuHelp.CAPTION = "Help"
mnuCopy.CAPTION = "Copy"
mnuCopy.Hint = "Copy"
cmdCopy.Hint = "Copy"
mnuCut.CAPTION = "&Cut"
mnuCut.Hint = "Cut"
cmdCut.Hint = "&Cut"
mnuDelete.CAPTION = "&Delete"
mnuDelete.Hint = "Delete"
cmdDelete.Hint = "Delete"
mnuEdit.CAPTION = "&Edit"
mnuExit.CAPTION = "&Exit"
mnuExit.Hint = "Exit"
cmdExit.Hint = "Exit"
mnuFind.CAPTION = "&Find"
mnuFind.Hint = "Find"
cmdFind.Hint = "Find"
mnuFile.CAPTION = "&File"
mnuNew.CAPTION = "New"
mnuNew.Hint = "New"
cmdNew.Hint = "New"
mnuOpen.CAPTION = "&Open"
mnuOpen.Hint = "Open"
cmdOpen.Hint = "Open"
mnuPaste.CAPTION = "&Paste"
mnuPaste.Hint = "Paste"
cmdPaste.Hint = "Paste"
mnuPrint.CAPTION = "Print"
mnuPrint.Hint = "Print"
cmdPrint.Hint = "Print"
mnuSave.CAPTION = "Save"
mnuSave.Hint = "Save"
cmdSave.Hint = "Save"
mnuSaveAs.CAPTION = "&Save As"
mnuSaveAs.Hint = "Save As"
mnuSelectAll.CAPTION = "Select&All"
mnuSelectAll.Hint = "SelectAll"
cmdSelectAll.Hint = "SelectAll"
mnuUndo.CAPTION = "&Undo"
mnuUndo.Hint = "Undo"
cmdUndo.Hint = "Undo"
END SUB
SUB mnuPortugueseBrazilian_Click
mnuAbout.CAPTION = "&Sobre"
mnuAbout.Hint = "Sobre"
cmdAbout.Hint = "Sobre"
mnuClear.CAPTION = "&Limpar"
mnuClear.Hint = "Limpar"
cmdClear.Hint = "Limpar"
mnuHelp.CAPTION = "Ajuda"
mnuHelp.Hint = "Ajuda"
mnuCopy.CAPTION = "Copiar"
mnuCopy.Hint = "Copiar"
cmdCopy.Hint = "Copiar"
mnuCut.CAPTION = "Cortar"
mnuCut.Hint = "Cortar"
cmdCut.Hint = "Cortar"
mnuDelete.CAPTION = "Apagar"
mnuDelete.Hint = "Apagar"
mnuEdit.CAPTION = "Editar"
mnuExit.CAPTION = "Sair"
mnuExit.Hint = "Sair"
cmdExit.Hint = "Sair"
mnuFind.CAPTION = "Localizar"
mnuFind.Hint = "Localizar"
cmdFind.Hint = "Localizar"
mnuFile.CAPTION = "Arquivo"
mnuNew.CAPTION = "Novo"
mnuNew.Hint = "Novo"
cmdNew.Hint = "Novo"
mnuOpen.CAPTION = "Abrir"
mnuOpen.Hint = "Abrir"
cmdOpen.Hint = "Abrir"
mnuPaste.Hint = "Colar"
mnuPaste.CAPTION = "Colar"
cmdPaste.Hint = "Colar"
mnuPrint.CAPTION = "Imprimir"
mnuPrint.Hint = "Imprimir"
cmdPrint.Hint = "Imprimir"
mnuSave.CAPTION = "Salvar"
mnuSave.Hint = "Salvar"
cmdSave.Hint = "Salvar"
mnuSaveAs.CAPTION = "Salvar como"
mnuSaveAs.Hint = "Salvar como"
mnuSelectAll.CAPTION = "Selecionar tudo"
mnuSelectAll.Hint = "Selecionar tudo"
cmdSelectAll.Hint = "Selecionar tudo"
mnuUndo.CAPTION = "Voltar"
mnuUndo.Hint = "Voltar"
cmdUndo.Hint = "Voltar"
END SUB
SUB mnuSpanishColumbia_Click
mnuAbout.CAPTION = "&Acerca de"
mnuAbout.Hint = "Acerca de"
cmdAbout.Hint = "Acerca de"
mnuClear.CAPTION = "&Limpiar"
mnuClear.Hint = "Limpiar"
cmdClear.Hint = "Limpiar"
mnuHelp.CAPTION = "Ayuda"
mnuHelp.Hint = "Ayuda Contenido"
mnuCopy.CAPTION = "Copiar"
mnuCopy.Hint = "Copiar"
cmdCopy.Hint = "Copiar"
mnuCut.CAPTION = "&Cortar"
mnuCut.Hint = "Cortar"
cmdCut.Hint = "Cortar"
mnuDelete.CAPTION = "&Eliminar"
mnuDelete.Hint = "Eliminar"
cmdDelete.Hint = "Eliminar"
mnuEdit.CAPTION = "&Editar (Redactar)"
mnuExit.CAPTION = "Salir"
mnuExit.Hint = "Salir"
cmdExit.Hint = "Salir"
mnuFind.CAPTION = "&Hallar (Encontrar)"
mnuFind.Hint = "Hallar (Encontrar)"
cmdFind.Hint = "Hallar (Encontrar)"
mnuFile.CAPTION = "Archivo"
mnuNew.CAPTION = "Nuevo (Nueva)"
mnuNew.Hint = "Nuevo (Nueva)"
cmdNew.Hint = "Nuevo (Nueva)"
mnuOpen.CAPTION = "Abrir"
mnuOpen.Hint = "Abrir"
cmdOpen.Hint = "Abrir"
mnuPaste.CAPTION = "Pegar"
mnuPaste.Hint = "Pegar"
cmdPaste.Hint = "Pegar"
mnuPrint.CAPTION = "Imprimir"
mnuPrint.Hint = "Imprimir"
cmdPrint.Hint = "Imprimir"
mnuSave.CAPTION = "Guardar"
mnuSave.Hint = "Guardar"
cmdSave.Hint = "Guardar"
mnuSaveAs.CAPTION = "Guardar como"
mnuSaveAs.Hint = "Guardar como"
mnuSelectAll.CAPTION = "Seleccionar todo (Marcar todo)"
mnuSelectAll.Hint = "Seleccionar todo (Marcar todo)"
cmdSelectAll.Hint = "Seleccionar todo (Marcar todo)"
mnuUndo.CAPTION = "Deshacer"
mnuUndo.Hint = "Deshacer"
cmdUndo.Hint = "Deshacer"
END SUB
SUB TabClose_Click (Shift,Sender)
Filename(ActFile) = FileTab.TabIndex - 1
Sender.DelTabs Sender.TabIndex
RichEdit.LoadFromFile(FileTab.Tab(FileName(Actfile) + 1))
RichEdit.Modified = 0
END SUB
SUB Show_Hint
IF Hint<>"" THEN
Status1.SimplePanel=1
Status1.SimpleText=Hint
ELSE
Status1.SimplePanel=0
END IF
END SUB
SUB Sync
DIM Oldpos AS INTEGER
DIM Position AS INTEGER
Position = SendMessageA( RichEdit.Handle, &Hce, 0, 0)
IF Oldpos <> Position THEN rftRuler.selstart = LEN( rftRuler.text)
SendMessageA( rftRuler.Handle, &Hb7, 0, 0 )
rftRuler.selstart = INSTR( rftRuler.Text, STR$( Position ))
SendMessagea( rftRuler.Handle, &Hb7, 0, 0 )
Oldpos = Position
DIM t AS INTEGER
IF rftruler.linecount<>RichEdit.linecount THEN
FOR t=rftruler.linecount TO RichEdit.linecount
rftruler.addstrings STR$(t)
NEXT
END IF
END SUB
SUB FileTab_Change(Sender AS QTABCONTROL)
Text(ActFile)=RichEdit.Text
ActFile=FileTab.TabIndex
FileTab.Hint = Filename(ActFile)
RichEdit.Clear
RichEdit.Text= Text(ActFile)
RichEdit.Modified = 0
SetFocus(RichEdit.Handle)
END SUB
|
|