vf编写程序

vf编写程序,第1张

①创建表单,添加两个标签、两个文本框和一个命令钮。

②设置标签和命令钮caption (用户名,口令,确认),命令钮Default设为.T.

③设text2的InputMask为:孝吵999或=“999”•

④设Text2的PasswordChar值•

⑤从“表单”中选“新建属性”,添加新属性num,并设默认0 。

⑥设置命令钮的click事件代码:(验证用帆闷户名abc,口令123456,是则显示欢迎使巧轿侍用并关闭;否则显示重输,三次不正确显示登录失败,关闭表单)

if thisform.text2.value="123456"

wait "欢迎进入 本系统…" wind time 2

thisform.releaseelse

thisform.num=thisform.num+1

if thisform.num=3

wait"你无权进入本系统!" wind time 2

thisform.release

else

wait "口令不正确,请重输!" wind timeout 2

endif

endif

步骤一、表一创建:set status 备纯肢on

set talk on

cd E:\my  裤锋 //*选路径*//

create 表一(按回车)然后进入表的编辑 输入字段,完成保存

步骤二、表二的创建 与表一完全相同 略.步骤三  update 表仿世一  set 表一.成绩=表二.数学成绩+表二.语文成绩 where 表一.姓名=表二.姓名

function fentodegree(fen as double) as string

dim a as string

if fen>=90 then

a="A"

elseif fen>=80 then

a="B"

elseif fen>=70 then

a="C"肆咐

elseif fen>=60 then

a="E"

else

a="F"

fentodegree=a

end function

3\

dim mystr as string

mystr="能被唯码29整除的数有如下:"

for i=1 to 100

if i mod 29 =0 then mystr=mstr+" "+cxtr(i)

next i

msgbox(mystr)

4$$$444444444444444

function jiecheng(innumber as long) as double

dim i as long

dim a as double

a=1

for i=1 to innumber

a=a*i

next i

jiecheng=a

end function

msgbox(jiecheng(10)-jiecheng(8)+jiecheng(5))

我的分啊!!!指雹哪!加加加


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/8256006.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-14
下一篇 2023-04-14

发表评论

登录后才能评论

评论列表(0条)

保存