pfc入门

1.将pfc pfe文件加入到pb 库搜索路径中
2.设置系统全局变量:sqlca 为n_tr error 为n_err  message 为n_msg
3.建立全局对象gnv_app ,应用对象 event:open n_cst_appmanager gnv_app=create n_cst_appmanager
                                                                         gnv_app.event pfc_open()
                                                              event:systemerror
                                                                         gnv_app.event pfc_systemerror()
                                                              event :close()
                                                                          if isvalid(gnv_app) then
                                                                               gnv_app.event pfc_close()
                                                                                destroy gnv_app
                                                                          end if
4.修改 n_cst_appmanager
            :connstruction    初始化版权 用户使用的注册表和配置文件 帮助文件位置等.
             :open(打开服务)   of_splash(1)
                        重要语句:sqlca.of_init('inifile','section')<>-1
                     sqlca.of_connect()<>-1

                                             open(w_framemain)
  处理登陆:     pfc_logon
select 查询数据库
 return 1 or -1
  
 
  5.使用继承的方法建立主窗口(单文档继承w_master,多文档继承w_frame) ,通过传递打开ue_login

ue_login:  if gnv_app.of_logon()=1 then
                         messagebox('提示','登陆成功')
                   else
                        messagebox('提示','登陆失败')
                          close(this)
end if
修改 w_login 窗口
:open
  this.of_setbase(true)
  this.inv_base.of_center()

建立菜单处理的事件 ue_pfcmenu() 随便建立
    w_sheet lw_sheet
   string      ls_sheetname
ls_sheetname=message.stringparm
opensheet(lw_sheet,ls_sheetname,0,layered!)





运行效果 http://hi.csdn.net/attachment/201012/9/0_1291865794j998.gif ************************************************************************* PowerBuilder Foundation Class Library Version 9.0 R E L E A S E N O T E S Copyright ?1996-2003 Sybase, Inc. and its subsidiaries. All rights reserved. ************************************************************************* Last Updated: January 17, 2003 ************************************************************************* Please take a few minutes to review this file for fixes that were made in PowerBuilder 8.0.2 and 9.0. ************************************************************************* BUG FIXES IN PFC 9.0 ************************************************************************* CR300376 Object: pfc_n_cst_fileSrv, pfc_n_cst_fileSrvwin32 Method: OfGetDiskSpace Fix: Method returned a negative number when the calculated amount of free disk space exceeded 2 gigabytes. Added new method of_GetDiskSpaceEx that takes decimals as arguments instead of longs. of_GetDiskSpace will be obsolete in a future release. ************************************************************************* BUG FIXES IN PFC 8.0.2 ************************************************************************* PFC.PBR CR256529 Fix: The PFC.PBR file can be used to copy bitmaps and dynamically referenced DataWindow objects into the executable file for deployment. The following bitmap files that were removed from PFC have now been removed from the PFC.PBR file: details.bmp, helptop.bmp, largeico.bmp, listv.bmp, and smallico.bmp. ======================================================== PFC DataStore CR261992 Object: pfc_u_ds Method: pfc_print/pfc_printdlg Fix: Changed the return code test to check for 1 on success, otherwise there is an error or the user cancelled. Fix: Set the
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值