文件名称:PB开发基础教程DOCX版
文件大小:23.52MB
文件格式:DOCX
更新时间:2019-12-27 15:09:58
PB
第 1 章 Hello World...........................................................................................................................1 1.1 创建 WorkSpace..................................................................................................................1 1.2 创建 Target ..........................................................................................................................2 1.3 创建窗口 .............................................................................................................................4 1.3.1 修改 Title 属性.........................................................................................................6 1.3.2 放置命令按钮...........................................................................................................6 1.3.3 编写脚本 ..................................................................................................................7 1.4 在 Application 对象上编写脚本.........................................................................................9 第 2 章 数据库 ................................................................................................................................12 2.1 创建数据库 .......................................................................................................................12 2.2 连接数据库 .......................................................................................................................16 2.2.1 创建 DSN ...............................................................................................................16 2.2.2 建立 DB Profile......................................................................................................19 2.3 创建数据表 .......................................................................................................................20 2.3.1 使用 Database 画板创建数据表............................................................................20 2.3.2 使用 PowerDesigner 创建数据表..........................................................................28 2.3.3 导出已有的数据表.................................................................................................39 第 3 章 窗口和菜单 ........................................................................................................................41 3.1 创建版权信息窗口 ...........................................................................................................41 3.2 创建主菜单 .......................................................................................................................47 3.3 创建主窗口 .......................................................................................................................52 3.4 创建屏幕保护窗口 ...........................................................................................................54 第 4 章 Application 对象.................................................................................................................58 第 5 章 数据窗口对象 ....................................................................................................................65 5.1 名片录入数据窗口 ...........................................................................................................65 5.2 名片修改数据窗口 ...........................................................................................................70 5.3 名片查询数据窗口 ...........................................................................................................72 第 6 章 错误处理机制 ....................................................................................................................74 第 7 章 多用户 ................................................................................................................................80 7.1 登录窗口 ...........................................................................................................................80 7.2 权限分配 ...........................................................................................................................84 7.2.1 创建 dw_users ........................................................................................................84 7.2.2 创建 w_users ..........................................................................................................86 7.2.3 创建 w_privelege....................................................................................................90 7.3 初始化 ...............................................................................................................................93 第 8 章 编写数据录入程序 ............................................................................................................95 8.1 创建全局函数 gf_getbh ....................................................................................................95 .III. 8.2 创建窗口 w_mp_input ......................................................................................................97 第 9 章 编写数据修改程序 ..........................................................................................................102 9.1 查询条件窗口 .................................................................................................................102 9.2 修改窗口 .........................................................................................................................104 第 10 章 编写查询程序 ................................................................................................................108 10.1 名片查询程序 ...............................................................................................................108 10.2 通用查询一 ...................................................................................................................109 10.2.1 显示所有数据表.................................................................................................109 10.2.2 设置查询条件.....................................................................................................111 10.2.3 设计窗口 ............................................................................................................111 10.3 通用查询二 ...................................................................................................................115 10.3.1 获取指定表中的字段.........................................................................................116 10.3.2 修改程序 ............................................................................................................118 10.4 通用查询三 ...................................................................................................................120 第 11 章 可恢复的删除.................................................................................................................123 11.1 准备知识........................................................................................................................123 11.1.1 缓冲区 123 11.1.2 应用实例 124 11.2 名片修改程序二 126 11.3 名片修改程序三............................................................................................................128 第 12 章 通用打印预览 ................................................................................................................131 第 13 章 通用排序程序 ................................................................................................................134 13.1 通用排序一 ...................................................................................................................134 13.1.1 创建数据窗口对象.............................................................................................134 13.1.2 设计窗口程序.....................................................................................................134 13.2 通用排序二 ...................................................................................................................140 第 14 章 制作帮助 ........................................................................................................................143 14.1 软件快速入门 ...............................................................................................................143 14.2 创建项目 .......................................................................................................................143 14.3 设置工程属性 ...............................................................................................................147 14.3.1 设置工程属性.....................................................................................................147 14.3.2 设置运行窗口属性.............................................................................................148 14.4 添加内容和索引 ...........................................................................................................150 14.5 全文搜索功能 ...............................................................................................................154 第 15 章 编译程序 ........................................................................................................................157 第 16 章 制作安装盘 ....................................................................................................................161 16.1 基本概念 .......................................................................................................................161 16.1.1 安装盘 ................................................................................................................161 16.1.2 程序组 ................................................................................................................161 .IV. 16.1.3 文件组、部件、安装类型.................................................................................162 16.2 使用步骤 .......................................................................................................................162 16.2.1 创建工程 ............................................................................................................162 第 17 章 编码规范 ........................................................................................................................173 17.1 综 述 .......................................................................................................................173 17.1.1 编程对象的分类.................................................................................................173 17.1.2 编程对象的组织.................................................................................................173 17.2 团 队 开 发 .................................................................................................................174 17.3 版 本 说 明 .................................................................................................................174 17.4 对象命名规范 ...............................................................................................................175 17.4.1 命名约定 ............................................................................................................175 17.4.2 具体命名规则.....................................................................................................175 17.5 变量命名规范 ...............................................................................................................179 17.5.1 变量类型约定.....................................................................................................180 17.5.2 变量范围命名约定.............................................................................................180 17.6 编 程 规 范 .................................................................................................................181 17.6.1 书写格式 ............................................................................................................181 17.6.2 流控制 ................................................................................................................182 17.6.3 注释及格式要求.................................................................................................182 17.6.4 Powerbuilder 脚本编程规范...............................................................................184 17.7 控件编程规范 ...............................................................................................................187 17.7.1 公共部分 ............................................................................................................187 17.7.2 控件细则 ............................................................................................................188 17.8 用 户 反 馈 .................................................................................................................191 17.8.1 使用反馈的场合.................................................................................................191 17.8.2 提供反馈的几种技术手段.................................................................................192 17.9 提高程序的健壮性 .......................................................................................................192 17.9.1 安全的应用软件.................................................................................................192 17.9.2 什么是安全的应用.............................................................................................192 17.9.3 使用数据窗口中应注意的问题.........................................................................193 17.10 文 档 标 准 ...............................................................................................................195 17.10.1 注释 ..................................................................................................................195 17.10.2 联机帮助 ..........................................................................................................195 17.11 错误处理准..............................................................................................................196 17.12 其 他 .....................................................................................................................196