还剩17页未读,继续阅读
本资源只提供10页预览,全部文档请下载后查看!喜欢就下载吧,查找使用更方便
文本内容:
第一章VisualFoxPro基础知识
1、什么叫数据库,数据库管理系统、数据库系统?数据库,是存储在外存中有结构的相关数据的__,是一种有结构的数据文件,是数据库管理系统管理的对象数据库系统,是一个引入数据库以后的计算机系统,他由计算机硬件及相关软件、数据库、数据库管理系统及用户组成数据库管理系统,是在操作系统支持下管理数据的软件,实现数据库的建立、使用和维护,是数据库系统的核心
2、简述数据库的3种模型,关系数据库的主要特点及操作数据库的数据模型有三种层次模型,网状模型,关系模型VisualFoxPro是一个关系型数据库管理系统关系数据库的主要特点关系中每一个属性都是不能再分的基本元素;各元组的县同列具有相同的数据类型;每个属性列被指定一个不同的属性名,在一个关系中,属性名不能重复;行、列顺序可任意变动,不影响表格信息;每个元组的内容是不相同的,不允许重复有选择、投影、连接三种基本操作
3、简述VisalFoxPro的常量和变量概念常量是以直观的数据形态和意义直接出现的数据,在整个程序的执行过程中,常量的值是固定不变的类型有数值性,字符性,逻辑型,日期型,货币型等变量是在程序执行过程中可以变化的数据项;变量实际上是用标示符命名的存放数据项的计算机内存单元变量有变量名、变量值、变量类型、长度、变量作用域等属性
4、简述VisalFoxPro变量的类型,系统变量的概念及作用,内存变量的建立、现实、删除存盘和恢复方法VisualFoxPro的变量可分为字段变量和内存变量,内存变量又可分为一般内存变量、系统内存变量和数组变量系统内存变量是VisualFoxPro自动创建并维护的内置内存变量是用来保持固定信息内存变量操作如下1)显示DISPLAYMEMORY或LISTMEMORY.2)清除RELEASE或RELEASEALL3)保存和恢复S__ETO内存变量文件名、RESTOREFROM内存变量文件名
5、简述VisalFoxPro的表达式类型,它们之间的运算规则VisualFoxPro的表达式可分为数值型表达式,字符型表达式,日期型表达式,关系型表达式,逻辑型表达式各种运算符的优先级为数值运算符高于关系运算符,关系运算符高于逻辑运算符所有同一级命令都是从左到右进行的,括号内的运算优先执行,嵌在最内层括号内的运算首先进行,然后依此由内向外执行
6、什么是函数?说明随机函数的概念和作用,宏代换函数的概念和作用函数是系统为实现一些特定功能而设置的内部程序,作为系统的一部分供用户使用随机函数(RAND())作用是返回一个0-
1.0之间的随机数宏代换函数()作用是用字符型内存变量的值代替内存变量的名
7、简述名表达式的概念和作用说明名表达式、宏代换函数、EVALUATE函数三者的区别及使用方法名表达式就是用一对括号将名称括起来,以实现替换功能例如X=学生.DBFUSE(X),后边的USE(X)相当于USE学生.DBF能用名表达式代替时,尽量用名表达式,因为名表达式比快得多,但应注意,只有在进行名称转换时才能使用名表达式,如果是处理表达式的读取,则不能使用名表达式取代
8、简述VisualFoxPro的启动和退出方法启动单击开始菜单上的程序选项,打开程序层叠菜单;__标到MicrosoftVisualFoxPro,打开VisualFoxPro
5.0;单击图标,即可启动VFP
5.0退出方法很多,最常用的是单击窗口右上角的关闭按扭第二章表的建立与操作
1、计表文件结构时如何确定字段明、字段类型和字段宽度?对表结构的建立主要是确定表结构的字段名、字段类型、字段宽度字段名又称字段变量,最长为10个字符,允许由字母、汉字、数字和下划线组成,但必须以字母或汉字开头,中间不能有空格字段类型有13种,它们是字符型、数值型、逻辑型、日期型、备注型、通用型、整型、双精度型、浮点型、日期时间型、货币型、二进制字符型、二进制备注型字段宽度逻辑型,1;备注型,4;通用型,4;整型,4;日期型,8;货币型,
82、LIST与DISPLAY命令有什么区别?LIST显示当前记录的内容和表达式的结果如果有更多的信息需要显示,而在窗口中显示不完,就滚动显示LIST也可用来显示表达式的结果,它可以包括字母和数字的组合、内存变量、数组元素、字段和备注字段DISPLAY显示当前表记录的内容和表达式的结果如果有更多信息需要显示,而在窗口中显示不完,就显示第一屏信息,然后暂停按任意键继续显示下一屏的信息不带所有选项时,DISPLAY的默认范围是当前记录
3、FIND与SEEK命令在使用上有何区别?FIND与SEEK命令都是索引查找命令由于索引查找速度快,又称快速查找FIND命令可用于字符型和数值型数据的快速查找,可以查找字符型和数值型常量,但不能查找变量和表达式用于查找的字符串呆以加定界符,也可以不加定界符若使用字符型变量,必须加SEEK命令查找的对象是表达式,即可以是常量、变量或表达式,字符型常驻量必须加定界符,字符型变量前不需加-SEEK命令的功能远强于FIND命令,所以在VisualFoxPro中很少使用FIND命令,而用SEEK命令取而代之
4、什么是排序和索引?两者有何区别?1)、概念不同排序是按关键字的顺序建立一个新的、与原文件同样大小、结构相同的物理文件,改变了物理顺序;索引只是在原表的基础上建一个按逻辑顺序排列的索引表,原表的物理顺序并无改变2)占存储空间大小不同排序后的文件与原文件大小相同,占存储空间大,且在排序时还要有临时转换空间,需有原表3倍大小的空间;索引文件只是一张相当于两个字段的表格,占存储空间小3)查找速度不同排序文件中的查询依然按记录的物理顺序,查找速度慢;索引文件中的查找是按逻辑顺序进行的,查找速度快4)使用方法不同;5)建立所需时间不同
5、删除表记录与删除表文件的命令各是什么?两者有何区别?删除表记录的命令是DELETE和PACK或ZAPDELETE是对表中要删除的记录加上删除标记,然后使用PACK真正删除记录ZAP是将表文件中的所有记录完全删除,它相当于DELETEALL后用PACK删除表文件的命令是ERASE或DELETEFILE删除表记录后表文件还存在,还存在表结构而删除表文件后,表记录和表结构都被删除
6、REPLA__命令与STORE命令、=运算符有何区别?REPLA__命令是用来修改字段的值,例如我们可以用REPLA__来修改学生表中的姓名字段REPLA__奖学金WITH100FOR姓名=李平STORE和=命令是用来为内存变量赋值STORE30TOM或M=30,M是内存变量REPLA__与STORE和=的处理对象不同
7、VISUALFOXPRO有几种类型的索引?如何用表设计建立索引?Visual FoxPro有种类型的索引文件一种是传统的.IDX文件,这种索引文件只有一个索引表达式,称为单项索引文件另一种是复合索引文件,其扩展名是.CDX,复合索引文件包含多个索引表达式,这些索引表达式称为索引标识在表设计器中建立索引的方法是打开要建立索引的表的表设计器,单击索引标识卡,出现其对话框;然后在索引名文本框中输入该索引标识的名字,索引名框右边按钮决定升序或降序;用鼠标可以改变索引表示列出的顺序;类型下拉表中可选择索引类型
8、什么是主索引?如何建立主索引?什么是SETORDERTO〈数值表达式〉的规则?主索引文件或主控标识决定了表文件的逻辑顺序,在使用打开索引文件或用SETORDERTO命令重新确定主索引文件或主控标识时,都会遇到索引序号这一概念所谓索引序号就是众多打开的索引文件或索引标识的排序首先是打开的单项索引文件在打开<索引文件名表>中的次序编号;然后是结构复合索引文件,按其生成顺序记数的索引标识的冷编号;最后是__复合索引文件,按其生成顺序记数的索引标识的冷编号SETORDERTO就是确定主索引的命令,其后跟索引序号
9、VFP中导出数据的几种方法:当VFP处理好数据后,这时你可以用多种方法将这些数据导出,以便被其它应用程序如Ex__l等所用下面向你简单介绍几种导出数据的方法
1.用导出数据对话框你可以从VFP主菜单中选择文件/导出…打开导出对话框,在该对话框中的来源框中输入表名c:\vfp\students.dbf,在类型中指定要导出数据的类型MicrosoftEx__l,在到框中输入导出的路径和文件名C:\ex__l\aa.xls,然后按确定即可这时你如果查看com__nd窗口,可发现以下代码 COPYTOC\ex__l\aa.XLSTYPEXL5
2.用COPYTO命令COPYTO命令的工作对象是VFP中的表,它要依据TYPE项才知道要产生哪一类导出文件对于上面的导出过程,可用以__法实现 USEstudents COPYTOC\ex__l\aa.XLSTYPEXL
53.用SETALTERNATETO写入ASCⅡ文件用该命令可以把屏幕上的内容导出导向一个文件,下面例子可以将系统状态输入到status.___文件中 SETALTERNATETOstatus.___ SETALTERNATEON SETCONSOLEOFF 系统状态+DTOCDATE+@+TIME LISTSTATUS SETALTERNATEOFF SETCONSOLEON
4.用SETPRINTERTO命令用该命令可把打印输出到文本文件中 SETPRINTERTOhello.___ SETPRINTON CHR27+广大计算机爱好者 你们好! 祝你们新年快乐 SETPRINTOFF
5.用REPORTFORMTOFILE命令运行报表的REPORT命令有许多选项,把报表输出保存到文件中的方法为REPORTFORM报表名TOFILE文件名
10、什么是表结构文件?如何用表结构文件建立和修改表结构?表结构文件就是存储表的结构的文件,它也是一个表,但是它是以表的字段为记录的我们可以用表结构文件来建立新表格式为CREATE<表文件名>FROM<表结构文件名>利用<表结构文件名>中说明的结构创建新表<表文件名>第三章程序设计基础
1、结化程序设计具在几种基本控制结构?哪几种?顺序结构是指程序的执行按其中的命令从上到下顺序执行选择分支结构是根据条件的测试结果执行不同的操作依次判断某一条件后来执行某一段固定程序,直到条件不满足
2、什么叫算法?如何表示算法?请用生活中的例子说明算法就是解决问题的方法及步骤表示算法的形式很多,如自然语言、传统流程图、N-S图和伪代码等无论哪种表示方法都可以达到清晰描述算法过程,整理解决问题思路的目的例如做一道菜,我们得先洗菜,然后用刀进行__,__好了后,点火,开始烧菜当然如果中间的步骤不同,做出来的菜的味道也就不同这一过程就是生活中做一道菜的算法
3、程序文件一般包括几部分?哪几部分?程序文件主要包括三部分数据输入、数据处理和数据输出输入语句包括表达式接收语句INPUT;字符串接收语句AC__PT;单字符接收语句WAIT输出语句包括换行输出语句?和同行输出语句??
4、什么叫死循环?如何预防死循环的出现?死循环是在循环语句中没有退出循环语句,或有退出循环语句而永远达不到退出循环的条件所以在编写程序时要预防死循环的出现,方法是要使条件判断变量在循环过程中变化,并且最终满足条件退出循环举例如下死循环A=1DOWHILEA0A=A+1ENDDO非死循环A=1DOWHILEA0A=A+1IFA99EXITENDIFENDDO
5、请说明过程和过程文件的区别?过程是一个由PRO__DURE<过程名>开头,ENDPROC结尾了子程序段,其所处的文件称为过程文件,即过程文件是由若干个过程构成的,而过程必须存放在一个过程文件中过程文件的扩展名为.PRG过程的存在格式为PRO__DURE<过程名>程序最后有ENDPROC过程是为完成某个操作而编写的代码,可以将过程放在单独的程序文件中,也可以放在一般程序的结尾
6、程序之间参数传递有几种方法?请说明每种方法的优缺点有两种利用内存变量的作用域属性;利用DO<文件名>WITH<参数表达式列表>利用不同属性的内存变量的作用域,可以实现程序之间参数和互传VisualFoxProK内存变量有4种作用域属性自然属性、公用属性、私有属性和本地属性利用内存变量的属性,可以实现主程序与子程序之间的参数传递,但使用的变量必须同名如果不想爱变量名的限制,又想达到传递参数的目的,就得利用DO<文件名>WITH<参数表达式列表>命令了
7、请说明内存变量的自然属性、私有属性和本地属性三者的异同点自然属性1)定义格示STORE/=、DIMENSION、DECLARE、INPUT、SUM等2)作用范围该程序及其调用的下属子程序3)传递方向单向(由主程序到子程序)4)变量寿命所在程序运行结束后,该变量被自动删除私有属性1)格示定义PRIVATE<内存变量列表>2)作用范围该程序及其下属子程序,同自然属性3)传递方向单向(由主程序到子程序),同自然属性4)变量寿命程序运行结束后,该变量被自动删除5)特殊作用可隐藏上级程序中与当前程序同名的变量,即对当前程序中变量的操作,不影响上级程序中与当前程序同名的变量值本地属性1)定义格示LOCAL<内存变量列表>2)作用范围该程序本身3)传递方向无4)变量寿命程序运行结束后,该变量被自动删除5)特殊作用可屏蔽上级程序中与当前程序同名的变量,即对当前程序中变量的操作,不影响上级程序中与当前程序同名的变量值同时也不受下属子程序中同名内存变量值的影响
8、请说明调用过程和调用自定义函数方法的异同点调用过程是用DO语句,DO<过程名>,而自定义函数虽然是一个子程序,但是不能用DO命令来调用而只能象内部函数那样出现在表达式中,自定义函数名参数表达式列表
9、一般一个VFP就用程序由几部分组成?通常一个VFP程序由以下几个部分一个或多个数据库、设置应用程序系统环境的主程序以及用户界面此外,还可以包括查询和报表,允许用户检索或输出自己的数据因此,无论多简单的问题,也应该包括数据源、交互界面和数据输出
10、面向过程的程序方法是什么?通常是将应用程序目标系统的整体功能进行分解,自顶向下不断的把复杂的处理分解为子处理,这样一层一层地分解下去,直到仅剩下若干个容易处理的子处理为止 第四章面向对象程序设计基础1.问什么是面向对象程序设计方法(OOP)?答在面向对象程序设计方法中,客观世界中的问题被看作客观世界中的实体与实体之间的关系及其相互作用每一个实体就是一个对象,其中包含有关数据和一组对这些数据的操作,是一个相当于微型程序的软件零件面向对象程序设计就是要将这些零件进行严密而有效的连接组装,形成能解决客观问题的软件机器2.问面向过程程序设计方法与面向对象程序设计方法的区别是什么?答面向过程程序设计方法与面向对象程序设计方法的区别有以下几点
①前者在程序设计时将数据和算法完全的分开,后者将数据和算法看作是不可分割的实体,称为对象;
②前者在程序设计过程中以算法为中心,围绕着实现系统功能的过程来构造系统,后者以数据为中心,所有的操作都围绕着数据而展开;
③前者是一句接一句地编写程序,后者主要是适当地创建对象、修改对象属性和编写对象的方法程序3.问利用面向对象程序设计方法进行程序设计的步骤是什么?答面向对象程序设计方法要在应用程序的统筹规划和设计之后作以下步骤
①创建对象或选用合适的对象
②设置对象的属性
③选择并设计适当的对象__及操作
④在过程代码中调用对象以实现对象之间的通信4.问什么是对象的封装性?答封装是指将对象的方法程序和属性代码包装在一起,对象的属性数据也可称为对象的内部数据外界用户(包括应用程序用户和其他对象实体)不能跨越对象的方法直接操作对象的内部数据5.问面向对象程序设计中,如何利用对象类的继承性实现代码的可重用性?答继承是指子类自动地共享其父类中定义的所有数据和方法的机制这样对于某一对象类的多个子类或多重子类而言,我们就不用重复地设计其中的一些基本数据和方法,从而实现了代码的可重用性6.多态性是指什么?答子类继承了父类的方法,但是在定义其中的过程时,可以根据子类的不同需求改变或修改父类中原有方法的实现算法,新的实现算法在子类中屏蔽父类的实现算法,这就是继承中的屏蔽性由于继承屏蔽性的存在,同一方法名在不同的类层次中或同一层次的不同子类中可能具有不同的实现算法,这就是多态性7.问如何向对象发送消息?消息的格式是怎样的答向对象发送消息就是对该对象的某一个固有操作(方法或__)的调用消息的格式如下对象名.方法名/__名([参数列表])8.问消息与方法的区别和__分别是什么?答消息时要求某个对象执行某个操作的常规命令;方法是对象内部的一段能完成特定操作的程序代码消息是调用方法的命令;方法是相应消息的算法实现程序9.问在VFP中,对象的方法程序与__有什么区别和__?答在VFP中,对象的方法程序分成两种第一种方法程序与对象的__相关联,其中的代码当__发生时执行,这种方法程序往往由程序设计人员自行设计算法;第二种方法程序是__于__存在的,其中的代码由消息来调用,这种方法程序一般是系统所固有的10.问容器和控件分别是什么?它们之间有何__?答容器类对象可以包含其他对象;控件类对象是一个单一而__的部件,其中不能包含其他对象它们之间是包含与被包含关系,这种关系可以不断的嵌套,从而形成容器层次11.问表单的Refresh方法和Release方法有何区别?答Refresh方法的功能是根据对表单的最新修改重新画出表单,并刷新其中的所有值除表单以外,Refresh方法还可应用于文本框、命令按钮等各类控件Release方法的功能是从内存中释放表单,它还可用于表单集12.问按钮组的Click__和组中某一按钮的Click__的区别是什么?答按钮组中按钮的Click__是针对于该按钮而设置的,与组中其他按钮无关,也就是说,当别的按钮被单击时,该Click__中的程序代码不会执行这类Click__的编写相对较为简单按钮组的Click__是对于整个按钮组而设置的,对组中的所有按钮都起作用因此,该Click__必须知道用户单击的是哪个按钮,我们要用按钮组的Value属性来确定这一点,并由此确定不同的程序执行代码,这可以用DOCASE…ENDCASE语句实现所以按钮组的Click__的编写比较复杂两种Click__能够实现同样的操作,用户可以根据习惯和需求选择编写13.问在容器层次中,引用对象的格式是什么?答在容器层次中,引用对象的格式有两种绝对引用对象表单集名.表单名.容器名
1.….容器名n.控件名例如,FormSet
1.Form
2.PageFrame
1.Page
1.Label3相对引用对象例如,ThisForm.Text1ThisFormSet.Form
2.Com__nd3等14.问修改属性值的两种方式是什么?答第一种方式是在程序设计的交互界面上修改属性值这种方式常用于一些一直保持不变的属性值或属性的初值第二种方式是在程序运行过程中修改属性值,这种修改是由写在各个方法程序中的语句来实现的这种方式用于随着程序运行不停变化的属性值15.问如何运用容器对象的编辑命令?答当要在某一容器对象的内部增加、删除、修改对象时,我们就要用到容器对象的编辑命令使用方法右击容器对象的任意位置,在弹出的快捷菜单中选取编辑菜单命令即可第五章表单的建立与操作16.问可以采用哪几种方法创建表单?答
(1)在项目管理器中选择文档选项卡,然后选择表单,选择新建再选择表单向导
(2)通过在工具菜单上选择向导选项并选中表单
(3)通过在文件菜单上选择新建,在新建窗口中,选择表单再选中向导按钮
(4)通过在主窗口上的工具栏中选择新建按钮,在新建窗口中选择表单再选中向导按钮17.问可以采用哪几种方法进入表单设计器?答
(1)通过项目管理器
(2)通过文件菜单
(3)通过在主窗口上的工具栏中选择新建按钮
(4)通过命令CREATFORM[表单名]18.问可以采用哪几种方法设置Tab键次序?答
(1)以交互方式设置Tab键次序
(2)用列表方式设置Tab键次序19.问可以将哪些类型的对象添加到表单中?答
(1)数据环境
(2)控件
(3)容器
(4)用户自定义类和OLE对象20.问什么是容器对象的收集属性和记数属性?答VisualFoxPro中的所有容器对象都有与它们相关联的收集属性和记数属性收集属性是引用其每个被包含对象的数组,其得到的值的类型为对象型记数属性是指示其包含的对象数的数值属性,其得到的值的类型为数值型21.问表单中的控件可分为哪几类?答表单中的控件可以分两类与表中数据绑定的控件(绑定型控件又称为数据型控件)和没有与数据绑定的控件(非绑定型控件)22.问编辑__或方法程序代码可采用的步骤有哪些?答
(1)从显示菜单中选择代码选项
(2)在过程框中选择__或方法程序
(3)在编辑窗口中键入代码,编辑方法与程序文件方法相似23.问如何设置表单或控件的前景或背景颜色?答
(1)从显示菜单中,选择工具栏并选择调色板
(2)选择前景颜色按钮或背景颜色按钮
(3)选定想改变的控件或表单
(4)在调色板工具栏中选择想使用的颜色24.问如何创建自定义颜色?答
(1)在调色板工具栏中,选择其他颜色
(2)在颜色对话框中,选择规定自定义颜色显示自选颜色选择器
(3)选择自定义颜色框,然后在自选颜色选择器中单击,选择所需的自定义颜色
(4)选择添加到自定义颜色,把新颜色添加到调色板中
(5)选择确定25.问要将参数传递到在表单设计器中创建的表单,可用哪些步骤来实现?答
(1)创建容纳参数的表单属性,也就是向表单中添加新属性,属性名根据问题的需要随意命名
(2)在表单的Init__代码中,包含语句PARAMETERS〈参数列表〉
(3)在表单的Init__代码中,将参数分配给属性
(4)当运行表单时,在DOFORM命令中包括一个WITH子句26.问若要从表单返回值,可采用哪些步骤来实现?答
(1)将表单的WindowsType属性设置为1,使表单成为模式表单
(2)在与表单的Unload__相关代码中,包含一个带返回值的RETURN命令
(3)在运行表单的程序或方法程序中,在DOFORM命令中包含TO关键字27.问要指定默认的表单模板,可采用哪些步骤?答
(1)从工具菜单选择选项命令
(2)在选项对话框中,选择表单选项卡
(3)在模板类区,选中表单复选框
(4)如果没有选定表单模板,会打开打开对话框,这样我们可以选择一个表单类如果己选定表单模板,可以选择对话按钮来选择其他的类
(5)如果想在以后的VisualFoxPro工作期中使用这个模板,选择设置为默认值按钮
(6)选择确定按钮28.问要将新属性添加到类中,可采用哪些步骤?答
(1)从类菜单选择新建属性
(2)在新建属性对话框中键入属性的名称
(3)指定可视性公共、保护或隐藏
(4)选择添加29.问要在类中添加新方法程序,可采用哪些步骤?答
(1)从类菜单中选择新方法程序
(2)在新方法程序对话框中,键入方法程序的名称
(3)指定可视性公共、保护或隐藏30.问要将类从一个类库__到另一个类库,可采用哪些步骤?答
(1)确保两个类库都在项目中(不一定是同一个项目)
(2)在项目管理器中,选择类选项卡
(3)单击包含类的类库左边的加号
(4)将类从旧库中拖到新库中31.问要注册一个类库,可采用哪些步骤?答
(1)从工具菜单中选择选项
(2)在选项对话框中,选择控件选项卡
(3)选择可视类库并选择添加按钮第六章数据库的建立与操作
1、VFP数据库由哪几个层次组成?关系数据库中数据间__是通过什么实现的?答VFP的数据库是由4个层次组成的数据库、表、记录和字段在关系数据库中,字段是关系的属性,记录是关系的元组,表则是一关系,而数据库即为多个关系的__在关系数据库中,只存在表(关系)这一种逻辑数据存储形式故关系数据库就是通过表来保存数据和数据之间__的
2、VFP中关键字的含义是什么?有哪几种常用的关键字?答在VFP的表中,如果某个字段或多个字段的值可以唯一地标识一条记录,则该字段就称为关键字如果一个关键字是用以区别每条记录的唯一性标志,并作为该表与其他表实现关联的,则称为主关键字或主码除主关键字以外的其他关键字称候选关键字当一个表的主关键字出现在另一个表中时,而对于后者来说,该关键字不是该表的主关键字,则称该关键字为外部关键字
3、VFP中最普遍的关系是哪一种?实现该关系对关键字有何要求?答VFP中最普遍的关系是表与表间的一对多__;实现该__时需将父表中的主关键字放入子表当中,以实现两表间的有效关联一方使用主索引关键字,多方使用普通索引关键字
4、数据库表与自由表有何区别?__如何?有何特点?答归属于某个数据库的表称为数据库表__存在、不与任何数据库相关联的表称为自由表两种表是可以相互转化的数据库表对于自由表来说具有更加强大的功能以及拥有自由表所没有的许多特性长文件名、字段验证等所以大多数应用需要建立数据库,并创建新表或添加自由表到数据库中,即成为数据库表
5、什么是关系数据库的完整性?包括几部分?如何实现?答数据库的完整性是指数据库中的数据的有效性、一致性和兼容性要实现数据库的完整性,必须在数据库的建立和操作过程中,遵循一定的完整性规则,并随时检查是否满足完整性的约束数据库的完整性包括以下三部分
(1)实体完整性指一个表中主关键字的取值必须是确定的、唯一的,不允许空值
(2)用户自定义完整性是由实际应用环境中的用户需求决定的通常为某个字段的取值限制、多个字段间取值的条件等
(3)参照完整性指在子表中实现关联的外部关键字的取值或为空值或为父表中实现相应关联的主关键字值的子集
6、什么是数据字典与数据工作期?有何用途?答数据字典是每一个VFP数据库所特有的一个数据__,其中存放数据库表的各种特征信息,也称存储数据库的数据库数据工作期是多表操作的动态工作环境利用它可以打开关闭和浏览多个数据库表或自由表,并可设置表属性
7、数据库表间的关系有哪几种?有何用处?如何建立?答在两个数据库表之间可以创建两和种关系类型永久性关系和临时性关系建立永久性关系的目的是
(1)为实现参照完整性提供依据
(2)在查询设计器、数据环境设计器中直接显示为表索引之间的连线,作为表单和报表间的默认关系
(3)在查询设计器、视图设计器中作为默认连接条件建立临时性关系的目的是让父表可以控制子表,使子表的记录指针随父表的记录指针的__而产生联动建立永久性关系可以通过数据库设计器或用命令方式建立临时性关系可以通过数据工作期窗口或命令方式
8、VFP中有哪几种有效性?包括哪些内容?答VFP中有字段级和记录级有效性规则字段级属性有定义长字段名、设置字段标题、设置字段注解、建立输入掩码、设置字段的默认值以及设置字段级有效性规则数据库表的其他属性有长表名和表的记录级有效性规则(可以在同一条记录的多个字段间进行比较,完成有效性规则的约束)
9、VFP中的触发器的工作原理是什么?有哪几种触发器?对应记录的哪些操作?答触发器是建立在表上的表达式,当表中的任何记录被指定的操作命令修改时,在执行了字段级、记录级、主关键字等有效性检查后,触发器就被激活利用触发器可以完成特殊的数据检验、参照完整性实施及数据库更新的维护操作等许多功能触发器分插入触发器、更新触发器和删除触发器三种,分别对应数据库表记录的插入、更新和删除操作
10、工作区使用规则有哪些?答如下所述
(1)在一个工作区内只能存在一个打开的表文件
(2)当前工作区只有一个,用户可对其中的表文件进行所有操作;但对非当前工作区中的非当前表文件进行操作时必须采取引用的方式别名·字段名或别名->字段名
(3)每个工作区中的表文件都有自己__的记录指针
(4)一个表文件能在多个工作区中打开
(5)指定工作区可以使用数据工作期或命令
(6)由系统指定当前可用的最小号工作区使用select0或use表文件in
011、建立多表表单应用的步骤有哪些?答大致过程如下
(1)创建一个或多个数据库
(2)在数据库环境下创建相应的数据库
(3)建立表间__
(4)建立参照完整性
(5)建立用户初始界面
(6)建立数据环境
(7)完善用户界面
(8)编写代码
12、怎样为备注型字段建索引答VisualFoxPro
3.0不支持长度变化的关键字,但如果所建索引的备注型字段的长度在建完索引后不再变化,那么建立备注型字段的索引还是可行的但在建索引时必须注意索引的表达式不能直接用备注型的字段名,还要略加变通,如用TRIM函数把备注型字段括起来,就能顺利地为备注型字段建索引第七章查询、视图及菜单设计
1、如何粘贴VFP顶层表单?答当你将表单设置为顶层表单并__运行于Windows下时会发现表单中__粘贴功能失效,这给实际工作造成极大的不便,从而使编制的软件达不到专业水准造成这一问题的原因是微软设计VFP时,只考虑了位于系统选单下的表单的__和粘贴情况,即位于系统选单下的表单可使用__及粘贴热键,而处于Windows下的表单完全脱离了系统选单的控制,因此__及粘贴热键失效解决的办法是可在表单的控件本文举例为文本框中为KeyPressEvent编写如下__处理程序该__处理程序首先将选择内容__到Windows剪贴板上,然后再将剪贴板上的内容添加到控件中KeyPressEventLPARAMETERSnKeyCodenShiftAltCtrlifnkeycode=3&&CTRL+C__-cliptext=this.seltextendififnkeycode=22&&CTRL+V粘贴docasecasethis.selstart=0this.value=-cliptext+this.valuecasethis.selstart〉=1andthis.selstart〈=lenthis.valuethis.value=substhis.value1this.selstart+-cliptext+substhis.valuethis.selstart+1endcaseendifthisform.grid
1.column
1.setfocusselere__temifnoteofskipendifthisform.refresh
2、如何在当前文档应用程序中使用我自己定制的菜单? 答假定已经创建了自己定制的菜单,从ActiveDoc类中的RunEvent来运行菜单程序最好是在显示任何表单之前及执行READEVENTS命令之前运行菜单程序
3、怎样改变菜单的字体大小答请参考
1、本来菜单生成器中是没有字体的选项的
2、利用菜单生成器的选项中跳过K即SKIPFOR中编写代码代码为.F.FONT宋体
123、实际上,生成的代码为skipfor.f.FONT宋体12这样就达到了改变菜单子项字体的目的但顶层菜单的字体是不会改变的
4、菜单生成后,您可以modimenumymenu
1.mpr
5、如果想完全解决问题可以利用API在进入系统时改变分辨率,使用户操作环境与__环境匹配可以参考有关vb的文章
4、如何建立一个带有顶层菜单的顶层表单?答要建立一个顶层表单,请将表单的ShowWindow属性设置为2-作为顶层表单要建立一个顶层菜单,请打开菜单设计器从显示菜单中,选择常规选项,然后设置顶层表单选项要想将顶层菜单放入顶层表单中,请在表单的Init__中添加如下代码DOmenuname.mprwithTHIS
5、当需查询或统计某一年龄段的人员资料时由于年龄是随时间递增的如果用手工或人工干预来增加年龄则是件非常麻烦的事不知有何方法能让数据库中的年龄字段的年龄自行递增答库中不要把年龄作为字段你只要登记人员的出生年份即可.显示时人员的年龄为今年与出生年分之差
6、在__环境中没问题,但编译并__到另一台机上就出问题了,说找不到文件而且弄不懂VFP6中的视图对象的SQL藏在那里,没法象查询那样?答视图对象的SQL保存在数据库文件中.你用use数据库.dbc就可看到view记录项.用视图前要先打开数据库
7、我做一个浏览功能的表单.数据取自三个dbf内有一表格数据源来自一个查询的结果.现在的问题是:每运行一次表单它先做查询一定要把查询结果的窗口关掉以后才显示我所要的浏览窗口?答将查询结果存放在一个dbfname.tmp文件上中再在自定义方法中用代码把dbfname.tmp与表格__起来代码可以这样写sele字段from数据表名where条件INTOCURSORABCthisform.grid
1.recordsour__=ABCthisform.grid
1.recordsour__type=
28、用VFP建立适用不同分辨率的菜单?答程序__者__的菜单一般仅适用于某些特定的分辨率,如果使用者的系统分辨率不同,将造成画面上菜单过长或过短,为解决此问题一般都__几个分别适应不同分辨率下的菜单,但如此一来将造成一些不必要的麻烦,下面的程序将解决此问题
1.首先在640*480分辨率下建立一新菜单
2.将下列代码放在复合式物件的INITMETHOD中LOCALOLDHEIGHT,OLDWIRTH,CHANGEHEIGHT,CHANGEWIDTHOLDHEIGHT=640OLDWIDTH=480CHANGEHEIGHT=0&&新分辨率与640*480分辨率之HEIGHT差CHANGEWIDTH=0&&新分辨率与640*480分辨率之WIDTH差*SY__ETRIC1&&得到目前分辨率HEIGHT*SY__ETRIC2&&得到目前分辨率WIDTHIFSYSTEMETRIC1!=OLDHEIGHTTHISFORM.LOCKSCREEN=.T.CHANGEHEIGHT=SY__ETRIC1/OLDHEIGHTCHANGEWIDTH=SY__ETRIC2/OLDWIDTH&&更改菜单外框IFTHIS.BASECLASS=FORMTHIS.HEIGHT=THIS.HEIGHT*CHANGEHEIGHTTHIS.WIDTH=THIS.WIDTH*CHANGEWIDTHTHIS.TOP=THIS.TOP*CHANGEHEIGHTTHIS.LEFT=THIS.LEFT*CHANGEWIDTHENDIF&&逐一更改CONTAINER内的控制项FORI=1TOTHIS.CONTROLCOUNTWITHTHIS.CONTROLSI.HEIGHT=.HEIGHT*CHANGEHEIGHT.WIDTH=.WIDTH*CHANGEWIDTH.TOP=.TOP*CHANGEHEIGHT.LEFT=.LEFT*CHANGEWIDTHENDWITHENDFORTHISFORM.LOCKSCREEN=.F.ENDIFTHISFORM.REFRESH注如果您预先设定最低分辨率为800*600首先在800*600分辨率下建立一新菜单把OLDHEIGHT=640改为OLDHEIGHT=800把OLDWIDTH=480改为OLDWIDTH=
6009、创建不带有标题栏的顶层表单实例答若要创建一个不带标题栏的表单,如果把它当作表单类的实例来创建,可能会有一定困难通常,通过如下设置可创建一个不带标题的顶层表单将ShowWindow属性设置为2(作为顶层表单)将BorderStyle属性设置为2(固定对话框)将Caption属性设置为空字符串将__xButton、MinButton、ControlBox和Movable属性设置为假.F.例如,用以下代码产生一个不带有标题栏的表单PUBLICmyFormmyForm=CREATEO__ECTblankFormmyForm.ShowRETURNDEFINECLASSblankFormASformShowWindow=2BorderStyle=2Caption=ControlBox=.F.__xButton=.F.MinButton=.F.Movable=.F.ENDDEFINE然而,表单显示时带有一个空标题栏为了解决此问题,并生成不带标题栏的表单,您可以先将Caption属性设置为一个字符串值,然后在表单的Init方法程序中将它重置为空字符串以下代码对前例做了修改,可以正确显示表单PUBLICmyFormmyForm=CREATEO__ECTblankFormmyForm.ShowRETURNDEFINECLASSblankFormASformShowWindow=2BorderStyle=2Caption=TestingformControlBox=.F.__xButton=.F.MinButton=.F.Movable=.F.PRO__DUREInitTHIS.Caption=ENDPROCENDDEFINE
10、当我把VFP的主窗口隐藏,将主表单设置为顶层表单,___运行该表单后,单击其中的按钮打开其他表单时,没有反应?答忘记把其他表单设置为在顶层表单中了也就是将表单的ShowWindow的值设为1-在顶层表单中
11、查询设计器要以图表方式输出时,却无法选择图表按钮,___?如何解决?答在VFP的WIZARDS目录下的WZGRAPH.APP就是查询设计器图形向导的应用程序,__VFP以后该应用程序即会__在WIZARDS目录如果图表按钮无法选择,可以在命令窗口执行_GENGRAPH命令查看系统变量的值,必然是空字符串解决方法是首先检查在WIZARDS目录下是否有WZGRAPH.APP应用程序,如果有的话,在命令窗口中执行_GENGRATH=VFP目录\wizards\wzgraph.app命令,返回查询设计器,图表按钮即可选择
12、菜单设计器的生成程序功能为何会失效?答菜单设计器之所以能生成程序,是因为执行了VFP的应用程序Ge__enu.Prg所提供的功能,因此,在进入[菜单设计器]以后,如果发现系统菜单[菜单]的[生成]选项无法选择,此时在命令窗口里执行_Ge__enu命令查看系统变量的值,必然是空字符串;或者点选系统菜单[工具]的[选项],进入[选项]窗口的[文件位置]标签页,可以发现[菜单生成器M:]右方的文本框也是空的,所以才无法启动生成器,解决方式可以在[选项]窗口,设置[菜单生成器M:]的应用程序为VFP目录内的Ge__enu.Prg,并点选[设定为默认值]按钮永久设置,也可以在命令窗口中执行_Ge__enu=VFP目录\Ge__enu.Prg命令第八章报表与标签的建立及设计
1、怎样快速地建立Grid表格答在程序中使用过Grid表格的程序员都觉得这种表格的建立方法有些麻烦,特别是当表格的个数及表格项很多的时候,甚至会产生恐惧感其实,只要能灵活地利用VFP的表单生成器,就能大大提高Grid表格的制作效率这里假设需要以TTT.DBF为处理对象建立一个Grid表格,因为字段很多,Grid表格的表格项数也相应的多,所以只能采用变通的方法,步骤如下建立一个只有两个字段的自由表aa.dbf,并使其中的一个字段能与TTT.DBF中的某个字段相关;启动表单生成器,选择向导方式中的一对多表单向导;在一对多表单向导的操作引导下,以aa.dbf为父表、TTT.DBF为子表的基本模式制作表单在选择子表字段时,以未来Grid表格的需要来进行TTT.DBF字段的选取打开由第
③步制作的表单,剪切表单上的Grid表格,然后再退出该表单;打开您程序中需要使用Grid表格的表单,把在第
④步上剪切的Grid表格__到当前表单上至此,一个符合程序要求的Grid表格即制作完毕无论Grid表格多么大,用本方法都能在两分钟内做出一个符合要求的Grid表格而用手工制作一个仅50个字段的Grid表格一般需要半个小时而且还可能出错显然,Grid表格越大,本方法的效率就越高
2、在报表设计器中,如何计算总页数? 答在编打印程序时,一般都是将要打印的数据存入一临时表中(如tmp.dbf),而每页打印的记录数为lines_per_page.总页数计算seletmptotal_pages=__ilingrecc/lines_per_page
3.如何在程序中更改报表的标题(该标题由用户在表单中输入)? 答使用变量例如:在标题中输入变量_TITLE打印报表时:PUBL_TITLE_TITLE=THISFORM.TEXT
1.VALUEREPOFORM...
4、使用报表打印时,如何控制打印页数及范围?答VFP中有这样的命令REPORTFORMXXXRANGEnStartPagenEndPagenStartPage是打印的第一页,nEndPage是打印的最后一页,看到这里,大家可能明白,要设置打印范围,只需更改nStartPage及nEndPage的值即可,现举例如下REPORTFROMdlhomerange25toprinter打印第2~5页REPORTFROMdlhomerange22toprinter打印第2页
5、VFP报表生成器使用技巧答VisualFoxPro
5.0VFP
5.0的报表生成器可以对单个数据库或多个数据库通过关联方式来产生报表其数据来源可以是内存变量,也可以是数据库中的记录报表的封面、表头、表体、表尾分别对应报表生成器的不同的带一般在标题带制作封面,在表头带制作各种表头,在详细带制作表体,在页脚带制作表尾
一、用报表生成器创建报表1打开要创建表的各个相关的数据库,设置索引,设置数据库的关联2将当前工作区选择为主库工作区3单击文件菜单,选择新建,在弹出的对话框中选择报表,然后,单击右上边的新文件图标选择系统菜单中的报表选项,在弹出的下拉菜单中选择快速报表选项,在弹出的对话框中__字段可以选择要打印的字段;__标题可以在表头带里打印或取消字段名;__添加别名可以在每个字段变量前加上当前工作区数据库的别名确认后即可自动在报表各个带里摆放相应的字段和变量建议不要加别名,否则当多个数据库共用一张表时,会出现找不到变量的错误用报表控制工具画出适当的表格线,用格式菜单中的文本对齐方式设置各个域的对齐方式,画出报表头和报表尾,一张表就基本制作完了
二、创建报表的技巧
1.对象组的选取在画表的过程中,经常要__各个带里对象的存放位置,或者把一个带里的对象拷贝或__到其它带里把要__的对象标记为一个对象组合,使对象__或拷贝的操作更加方便,标记对象组的方法有如下几种1当要标记一个带里的所有对象时,可以双击该带下端的分隔条,选取该带里的所有对象,然后选择格式菜单中的分组选项,把所有选取的对象标记为一个对象组,方便__或拷贝2当要标记相邻的多个对象时,用鼠标拖曳出一矩形框,把要选取的对象圈入矩形框中,释放鼠标,则可同时选取多个对象3当要标记不相邻的多个对象时,按下Shift键的同时,用鼠标__要选取的对象,选中后再组合为一个对象组当同时__多个对象时,如果不把这些对象标记为一个对象组,则用光标多次__对象位置时,系统会报告内存不够的错误信息
2.对象的条件打印创建报表时经常要控制在特定条件下打印特定的信息,这可以用对象的条件打印来实现,我们以页号的打印为例来讨论对象的条件打樱通常页号的打印直接利用系统变量_pageno来打印___数字,现在我们页号变为中文
一、
二、三利用文本输入工具,在报表中创建文本对象
一、
二、三等,鼠标双击一,在弹出的对话框中选择printwhen,在弹出的打印条件设置对话框中__printonlywhen选择框,在表达式中填入_pageno-1,确认后退出如上操作,对文本对象二设置其打印条件为_pageno-2;对文本对象三设置其打印条件_pageno-3设置完成各个文本对象的打印控件后,把它们__到要打印页号的位置,重叠放置用预示功能查看,可看到页号已变成中文数字
3.表格线对齐通常表格线对齐是用鼠标拖曳线段的段点,往往不易做到一次就能对齐,经常需要反复调整实际上,当需要按像素调整线段的长度时,可以采用如下的方法如是水平线段,则用鼠标__线段右端点,线段向右拉长一个像素,左段点位置不变__左端点,线段向右缩短一个像素,右段点位置不变,用这种方法,便于精确对齐同样,对垂直线段,__上端或下端,分别向下缩短或拉长一个像素
6、建立新的标签文件时,曾经会先出现[新标签]的窗口,让使用者选择标签的制式规格,后来再也不出现了,___?如何解决?答VFP__完成后,系统会将制式标签的规格数据存储在VFP目录内的资源文件Foxuser.dbf(另一个必要文件为Foxuser.fpt),而该文件如果不慎被删除,VFP会再自动生成,只是原先存储的制式标签规格数据不会自动复原,所以才会造成新建标签文件时,没有出现选择标签规格的窗口这时只要执行VFP所带的应用程序AddLabel.App即可将制式标签规格的数据重新写回资源文件(注VFP
3.0的AddLabel.app__在VFP目录中;VPF
5.0则__在VPF目录下的Tools\AddLabel\子目录内)
7、建立新的标签文件时,曾经会先出现[新标签]的窗口,让使用者选择标签的制式规格,后来再也不出现了,___?如何解决?答VFP__完成后,系统会将制式标签的规格数据存储在VFP目录内的资源文件Foxuser.dbf(另一个必要文件为Foxuser.fpt),而该文件如果不慎被删除,VFP会再自动生成,只是原先存储的制式标签规格数据不会自动复原,所以才会造成新建标签文件时,没有出现选择标签规格的窗口这时只要执行VFP所带的应用程序AddLabel.App即可将制式标签规格的数据重新写回资源文件(注VFP
3.0的AddLabel.app__在VFP目录中;VPF
5.0则__在VPF目录下的Tools\AddLabel\子目录内)第九章OLE应用及编译应用程序
1、如何使自己编写的程序脱离VFP运行?答利用VFP
6.0创建的应用程序,被编译成可执行程序后,若要使其脱离VFP环境__运行,除了我们所知道的在应用程序目录中需包含一个名为CONFIG.FPW的配置文件外,还必须包含VFP6R.DLL、VFP6RCHS.DLL、VFP6RENU.DLL这三个动态链接库文件这三个文件在Windows\System目录下,用户可直接将其__到自己的应用程序目录中最后再经过编译形成可执行程序,运行__向导创建发布磁盘,我们__的小应用程序就可以堂堂正正地在Win98下__运行了
2、用VPF做一个表单,生成.EXE文件,在VPF里运行很正常,可退出,在WIN下运行发现表单一闪而过,是什么原因,答做一个主程序(如__IN.PRG),内容为DOFROMformnameREADEVENT在退出表单的代码最后加上CLEARENENT在项目管理器中设置__IN.PRG为主程序连编为.EXE文件即可
3、在使用VFP60时将源程序连编成可执行文件,运行该文件总要出现工具栏(在进行连编时,编程环境中已经取消了工具栏显示)答:将工具栏用鼠标拖放到另一位置,在右键单击工具栏,选择关闭之后不但该程序的工具栏消失,而且所有VFP程序的工具栏也不会出现了
4、编译了一个程序运行时主窗口没有占满整个屏幕如何使主窗口一运行就最大化答把编译了的程序在Windows是建立一个快捷键,然后修改其属性,选择最大化就可以了若使用了系统窗口,可以这样做SCREEN.WINDOWSTATE=2,若不使用系统窗口,可以上面的代码改为主表单名.WINDOWSTATE=2即可
5、把vfp编译后的一exe文件拷入一在未装vfp的计算机不能运行是否缺少动态链接文件答从一个项目中,可以建立应用程序文件.app或者可执行文件.exe如果用户有一个完整的VisualFoxPro副本,则可以运行一个.app文件另外一个选择方案是建立一个可执行文件该可执行文件需要和两个VisualFoxPro动态连接库Vfp5r.dll和Vfp5enu.dll连接,这两个库和应用程序一起构成了VisualFoxPro所需的完整运行环境VFPxxx.DLL指定用于应用程序__的地区版本
6、如何在程序中播放动画?答将GIF动画分解成各单独的静止的GIF或BMP__,然后在VFP使用计时器让这些静止的__轮流出现,就产生动画效果了将GIF动画分解为静止__的软件有很多,在网上很容易找到,如Ani__gicGIF等分解出来的__我们分别以a
0.bmp、a
1.bmp……这样的形式保存在表单中添加计时器TIMER1,TIMER1的Interval属性设为100,Enabled属性设为.T.,再添加I__ge1控件,其Backstyle属性设为0透明,Stretch也设为0裁剪在FORM的LOAD过程中写代码PublicINI=0N=5静止__的总共数目在TIMER1的TIMER过程中写代码Localji=modi+1nj=alltrimstrithisform.i__ge
1.picture=″a″-j-″.bmp″运行表单,我们就可以看到熟悉的GIF动画了
7、从VFP中导出数据的几种方法!答当VFP处理好数据后,这时你可以用多种方法将这些数据导出,以便被其它应用程序如Ex__l等所用下面向你简单介绍几种导出数据的方法
1.用导出数据对话框你可以从VFP主菜单中选择文件/导出…打开导出对话框,在该对话框中的来源框中输入表名c:\vfp\students.dbf,在类型中指定要导出数据的类型MicrosoftEx__l,在到框中输入导出的路径和文件名C:\ex__l\aa.xls,然后按确定即可这时你如果查看com__nd窗口,可发现以下代码COPYTOC\ex__l\aa.XLSTYPEXL
52.用COPYTO命令COPYTO命令的工作对象是VFP中的表,它要依据TYPE项才知道要产生哪一类导出文件对于上面的导出过程,可用以__法实现USEstudentsCOPYTOC\ex__l\aa.XLSTYPEXL
53.用SETALTERNATETO写入ASCⅡ文件用该命令可以把屏幕上的内容导出导向一个文件,下面例子可以将系统状态输入到status.___文件中SETALTERNATETOstatus.___SETALTERNATEONSETCONSOLEOFF系统状态+DTOCDATE+@+TIMELISTSTATUSSETALTERNATEOFFSETCONSOLEON
4.用SETPRINTERTO命令用该命令可把打印输出到文本文件中SETPRINTERTOhello.___SETPRINTONCHR27+广大计算机爱好者你们好!祝你们新年快乐SETPRINTOFF
5.用REPORTFORMTOFILE命令运行报表的REPORT命令有许多选项,把报表输出保存到文件中的方法为REPORTFORM报表名TOFILE文件名
8、VisualFoxPro
3.0中背景音乐的实现答在使用VisualFoxPro
3.0编制应用程序时,我们可以利用OLE嵌套的方法很容易的为一个应用程序加入背景音乐进入VisualFoxPro
3.0系统环境,在命令行窗口中键入CREATEFORM或在文件菜单中选择新建、表单,即可建立一个新的表单表单建立后可对表单进行一些设置,如表单屏幕大小、表单底图、表单上的按钮、表单上要显示的文字等,做出一个漂亮的屏幕界面__表单控制上的OLE容器,并将其拖至FORM中任意位置在插入对象窗口中选择媒体剪辑,选中以图标显示栏(必须选中此栏,否则无法将其隐藏起来),按确认键退出在媒体播放机窗口中,选择文件、打开,从文件列表中选择想要作为背景音乐的声音文件作为背景音乐,必须是程序启动时开始播放,直到程序结束由于音乐文件一般不是很长,所以要求循环播放,此时可选择编辑菜单中的选项,在选项窗口中选中重复播放和去掉重放的控制条前的选中标记,确认后退出回到VisualFoxPro
3.0系统环境,按下鼠标右键,在弹出菜单中__属性栏调出属性窗口选择Olecontrol1对象,将它的Visible属性设为.F.,Autosize属性设为.F.再按下鼠标右键,在弹出菜单中__代码栏进入过程书写窗口,选择Form1对象的Activate过程,在过程栏中加入Thisform.Olecontrol
1.Doverb0__Form1窗体,按下鼠标右键,在弹出菜单中__运行,即可运行此程序
9、应用系统编译成EXE文件执行后,桌面无法放大为全屏幕,如何解决?答1如果主程序为菜单文件,可以在[设置]或[清理]的程序中加上_Screen.WindowState=2命令将窗口最大化(2如果主程序为表单文件,可以在表单LoadEvent程序中加上_Screen.WindowState=2命令将窗口最大化第十章网络环境下数据共享操作
1、在多用户环境下,人允许其他用户执行的操作来说,独占与加锁的区别是?答独占方式不允许其他用户读或写,加锁方式不允许其他用户写,但允许用户允许其他用户读
2、有两张表单处理同一数据库,由一个表单调用另一个表单,如何保持两表单同步刷新?答用一时钟控件,过一段时间就比较表单中的数据与数据库中的数据是否还同,如不同则重新写入
3、___我在FOXBASE中SETEXCLUSIVEOFF但数据库却不能共享答请参考
1、改变SETEXCLUSIVE的设置并不改变已经打开表的状态例如,如果一个表是在SETEXCLUSIVE设置为ON时打开的,当把SETEXCLUSIVE的设置改变为OFF时,表仍然保持原来的独占状态
2、susp观看setexcl状态何时已经改变
3、usemytableshare
4、如何在VFP中判断目前进入网络的使用者是谁?答请参考运用VFP所提供的SYS
(0)与ID()函数可完成此项工作,SYS
(0)与ID()函数的作用是完全相同的,它们都是于网络环境中传回所属工作站的电脑名称与目前进入网络的使用者名称现举例如下设有一名为SLGD01的WIN95工作站以使用者名称A01进入网络,接着运行VFP,则在VFP中执行SYS
(0)函数时将传回SLGD01#A01同样,ID()可得相同值。