home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2001 June
/
VPR0106A.BIN
/
OLS
/
FSC202
/
fsc202.lzh
/
Calc.fxl
< prev
next >
Wrap
Text File
|
2001-03-18
|
3KB
|
184 lines
// Name :
// Author :
// Upadte : 01/03/18 11:21:19
// Generator : FXL designer for FScript v1.01
// == 前処理 ==
// == フォーム作成 ==
main.add();
main.taskbar=true;
// == オブジェクト生成 ==
main.width="420";
main.height="217";
main.caption="電卓のサンプル";
main.btn.add(265,94,30,30); //object
main.btn.caption="1";
main.btn.add(300,94,30,30); //object
main.btn.caption="2";
main.btn.add(340,94,30,30); //object
main.btn.caption="3";
main.btn.add(265,56,30,30); //object
main.btn.caption="4";
main.btn.add(300,56,30,30); //object
main.btn.caption="5";
main.btn.add(340,56,30,30); //object
main.btn.caption="6";
main.btn.add(265,20,30,30); //object
main.btn.caption="7";
main.btn.add(300,20,30,30); //object
main.btn.caption="8";
main.btn.add(340,20,30,30); //object
main.btn.caption="9";
main.btn.add(265,130,30,30); //object
main.btn.caption="0";
main.editbox.add(21,23,231,20); //object
main.btn.add(23,53,40,30); //object
main.btn.caption="+";
main.btn.add(68,53,40,30); //object
main.btn.caption="-";
main.btn.add(115,53,40,30); //object
main.btn.caption="/";
main.btn.add(161,53,40,30); //object
main.btn.caption="x";
main.btn.add(301,130,70,30); //object
main.btn.caption="=";
// == 後処理 ==
main.deffunc.set(macro.body);
main.bring("center");
main.visible="true";
DATA="";
OP="";
fstinp=false;
// == サブルーチン ==
function OnBtnClick1()
{
InpNum("1");
}
function OnBtnClick2()
{
InpNum("2");
}
function OnBtnClick3()
{
InpNum("3");
}
function OnBtnClick4()
{
InpNum("4");
}
function OnBtnClick5()
{
InpNum("5");
}
function OnBtnClick6()
{
InpNum("6");
}
function OnBtnClick7()
{
InpNum("7");
}
function OnBtnClick8()
{
InpNum("8");
}
function OnBtnClick9()
{
InpNum("9");
}
function OnBtnClick10()
{
InpNum("0");
}
function OnBtnClick11()
{
if (DATA != "") {
A = main.editbox(1).text;
DATA = eval("DATA+A");
main.editbox(1).text = DATA;
} else {
DATA = main.editbox(1).text;
}
OP="+";
fstinp=true;
}
function OnBtnClick12()
{
if (DATA != "") {
A = main.editbox(1).text;
DATA = eval("DATA-A");
main.editbox(1).text = DATA;
} else {
DATA = main.editbox(1).text;
}
OP="-";
fstinp=true;
}
function OnBtnClick13()
{
if (DATA != "") {
A = main.editbox(1).text;
DATA = eval("DATA/A");
main.editbox(1).text = DATA;
} else {
DATA = main.editbox(1).text;
}
OP="/";
fstinp=true;
}
function OnBtnClick14()
{
if (DATA != "") {
A = main.editbox(1).text;
DATA = eval("DATA*A");
main.editbox(1).text = DATA;
} else {
DATA = main.editbox(1).text;
}
OP="*";
fstinp=true;
}
function OnBtnClick15()
{
if (DATA != "") {
A = main.editbox(1).text;
DATA = eval(str("DATA",OP,"A"));
main.editbox(1).text = DATA;
}
OP="";
DATA="";
fstinp=true;
}
function InpNum()
{
if (fstinp==true) {
main.editbox(1).text = arg.pos();
} else {
main.editbox(1).text = str(main.editbox(1).text, arg.pos());
}
fstinp=false;
}