Este bloco de notas pode lidar com arquivos maiores do que o enviado com Win9x.
Aprenda a fazer com que o Windows pareça interfaces no HTML.
Uso interessante de Commondialogs.
效果图
代码如下:
<html> <head>
<HTA: Aplicação
ApplicationName = "hTanotepad" id = "Ohta" Border = "Gross"
BordersTyle = "Normal" legenda = "Sim" contextmenu = "Sim"
INNERBORDER = "Não" maximizeButton = "Sim" MinimizeButton = "Sim"
Navegável = "sim"
Icon = "notepad.exe" scroll = "no" scrollflat = "não"
Seleção = "Não" ShowIssaskbar = "Sim" SingenInstance = "Não"
Sysmenu = "sim" versão = "0.3" windowstate = "normal">
<Style type = "text/css">
<!-
Corpo {XFont-Family: "Verdana, Arial, Helvetica, Sans-Serif";
Fonte: menu;
Background-Color: Menu;
Cor: Menutext;
XFont-Size: 8pt;
Cursor: padrão; // Auto, texto, ponteiro
}
Tabela {XFont-Family: "Arial";
XFont-Size: 8pt;
Fonte: menu;
preenchimento: 0pt;
borda: 0pt;
Filtro: Progid: dIMAGETRANSForm.microsoft.alpha (style = 0, opacidade = 90);
}
Iframe {altura: expressão (document.body.clientHeight-menutable.clientHeight);
largura: 100%;
}
TD {Border: "1px Solid Menu";}
.submenu {posição: absoluto; top = 20;
Background-Color: Menu;
Border = "2px TEART";}
.Menuin {Border: '1px Inset';}
.Menuover {Border: '1px TEART';}
.Menuout {Border: '1px Solid';}
.Submenuover {Background-Color: Destaque; Color: DestactText;}
.Submenuout {Background-Color: Menu; Cor: Menutext;}
->
</Style>
<idioma de script = vBScript>
opção explícita
Dim FileName, Fmodif, LastChildmenu, Lastmenu
fmodif = false'N't Modified
DisplayTitle
Definir LastChildmenu = nada
Defina LastMenu = nada
Sub DisplayTitle
Se filename = "" então
document.title = "sem título -" & Ohta.ApplicationName
Outro
document.title = nome do arquivo & " -" & Ohta.ApplicationName
Final se
Final sub
'' '' '' '' '' '' '' '' '' '' '' ''
'Gerenciamento de arquivos'
'' '' '' '' '' '' '' '' '' '' '' ''
Sub Saveas
Dim odlg
Set odlg = createObject ("mscomdlg.commondialog")
Com odlg
.Dialogtitle = "saveas"
.Filter = "scripts |*.vbs;*. Hta;*. Wsf;*. Js | arquivos de texto |*.txt | todos os arquivos |*.*" "
.MaxFilesize = 255
.SoSaveve
Se .filename <> "" então
Arquivo de arquivo = .Filename
Salvar
Final se
Termine com
Defina ODLG = nada
DisplayTitle
Final sub
Sub save ()
Dim fso, f
Se o nome do arquivo <> "" então
Set fso = createObject ("script.filesystemoBject")
Set f = fso.createTextFile (nome do arquivo, true)
F.Write myframe.mytext.value