导航:首页 > 方法技巧 > vfp如何编写表单事件方法

vfp如何编写表单事件方法

发布时间:2023-08-18 16:14:22

① 简述在vfp中创建表单程序的步骤


1、在表单上新建标签label1~label5
2、在表单上新建文本框text1~text5
3、在表单上新建命令按钮command1~command5
4、将表单的数据环境添加rcda.dbf
5、在表单的Init事件里面录入:
with thisform
.label1.caption='编号'
.label2.caption='姓名'
.label3.caption='性别'
.label4.caption='出生日期'
.label5.caption='工资现状'
.command1.caption='每一个'
.command2.caption='上一个'
.command3.caption='下一个'
.command4.caption='最后一个'
.command5.caption='退出'
endwith
6、command1的click事件
go top
7、command2的click事件
if .not.bof()
skip -1
endif
8、command3的click事件
if .not.eof()
skip
endif
9、command4的click事件
go bott
10、command5的click事件
thisform.release

根据④作出一些修改就行了。

② 关于VFP中表单新建方法的调用

1)运行VFP软件,加载表单所在VFP项目。选Docs页。

3)保存所做的修改。运行该表单,测试按钮Click事件代码。

③ vfp表单设计


(1)Form1的Init事件代码:
thisform.timer1.enabled=.t.

(2)Timer1的Timer事件代码:
thisform.caption='计时:'+time()
if thisform.label1.fontsize=60
thisform.label1.fontsize=9
else
thisform.label1.fontsize=thisform.label1.fontsize+1
endif


(1) 表单form1的init事件代码:
set century on
thisform.timer1.enabled=.t.

(2)计时器控件timer1的timer事件代码:
thisform.text1.value=alltrim(str(year(date())))+'年'+alltrim(str(month(date())))+'月'+alltrim(str(day(date())))+'日'
thisform.text1.value=time()

阅读全文

与vfp如何编写表单事件方法相关的资料

热点内容
碳水化合物检测方法 浏览:507
大数据教学方法论文 浏览:439
红米手机开机键在哪里设置方法 浏览:45
整数减分数最简单的方法 浏览:633
14x37x5的简便方法 浏览:303
定制衣柜门套安装方法 浏览:418
做衣服用电机方法视频 浏览:462
比例是运用了什么思想方法 浏览:401
楼梯弯头度数计算方法 浏览:956
安全提篮使用方法 浏览:537
如何做作业的新方法 浏览:658
帝王菜的功效与作用及食用方法 浏览:201
基础梁设计处理的计算方法 浏览:294
打啤酒的正确方法视频 浏览:251
蓝牙连接有线路由器的方法 浏览:946
学英语的方法和技巧答案 浏览:825
办案区防撞软包安装方法 浏览:583
防雷接地装置计算方法 浏览:610
临床化学检测多用什么方法 浏览:254
催乳按摩方法图片 浏览:236