このメモ帳は、Win9Xで出荷されたファイルよりも大きなファイルを処理できます。
HTMLでWindowsを外観のインターフェイスを作成する方法を学びます。
Commondialogsの興味深い使用。
效果图:
代码如下:
<html> <head>
<HTA:アプリケーション
applicationName = "htanotepad" id = "ohta" border = "厚い"
borderStyle = "normal" caption = "yes" contextmenu = "yes"
innerborder = "no" maximizebutton = "yes" minimizebutton = "yes"
navigable = "yes"
icon = "notepad.exe" scroll = "no" scrollflat = "no"
selection = "no" showintaskbar = "yes" singleinstance = "no"
sysmenu = "yes" version = "0.3" windowstate = "normal">
<style type = "text/css">
<! -
ボディ{xfont-family: "verdana、arial、helvetica、sans-serif";
フォント:メニュー;
背景色:メニュー;
色:Menutext;
Xfont-Size:8pt;
カーソル:デフォルト; //自動、テキスト、ポインター
}
表{Xfont-Family: "arial";
Xfont-Size:8pt;
フォント:メニュー;
パディング:0pt;
ボーダー:0pt;
フィルター:progid:dmimagetransform.microsoft.alpha(style = 0、ofacity = 90);
}
iframe {height:expression(document.body.clientheight-menutable.clientheight);
幅:100%;
}
TD {border: "1px solid menu";}
.submenu {position:absolute; top = 20;
背景色:メニュー;
border = "2px outset";}
.menuin {border: '1px Inset';}
.menuover {border: '1px冒険';}
.menuout {border: '1px solid';}
.submenuover {background-color:highlight; color:highlighttext;}
.submenuout {background-color:menu; color:menutext;}
- >
</style>
<スクリプト言語= vbscript>
オプションは明示的です
Dim Filename、fmodif、LastChildmenu、LastMenu
fmodif = false'not修正
DisplayTitle
lastChildMenu = Nothingを設定します
lastmenu = Nothingを設定します
サブディスプレイタイトル
filename = "" thenの場合
document.title = "sans titre-"&ohta.applicationname
それ以外
document.title = filename& " - "&ohta.applicationname
ifを終了します
End Sub
'' '' '' '' '' '' '' '' '
「ファイル管理」
'' '' '' '' '' '' '' '' '
サブサブアス
dim odlg
set odlg = createObject( "mscomdlg.commondialog")
ODLGで
.dialogtitle = "saveas"
.filter = "スクリプト|*.vbs;
.maxfilesize = 255
.showsave
if .filename <> "" then
filename = .fileName
保存
ifを終了します
で終わります
odlg = Nothingを設定します
DisplayTitle
End Sub
sub save()
dim fso、f
filename <> "" thenの場合
fso = createObject( "Scripting.filesystemObject")
f = fso.createTextfile(filename、true)を設定します
f.write myframe.mytext.value