网站公告列表     爱师软件改版了...  [admin  2008年6月25日]        
加入收藏
设为首页
联系站长
您现在的位置: 爱师软件 >> 文章中心 >> VFP 程序设计 >> 正文
  [推荐]VFP中与相片处理相关代码         ★★★★ 【字体:
VFP中与相片处理相关代码
作者:尹红泽    文章来源:本站原创    点击数:    更新时间:2008-6-26    

 ******预处理所有相片按钮的click事件代码
 ********版权:尹红泽 2005
    select xianpian
 local cur_xh
 cur_xh=''
 local p_yn
 p_yn=.f.&&相应学号相片文件是否存在
 yn = messagebox('预处理相片可能较慢,请耐心等待!',1+16+256,'警告')
 if yn = 1
  wait window '正在处理,请耐心等待。。。' nowait
  select xianpian
  go top
  scan
    append general xianpian
  endscan
  select xianpian
  go top
   scan
     cur_xh=allt(xianpian.xuehao)
     cur_xh='.\photo\'+cur_xh+'.bmp'
     p_yn=file('&cur_xh')
     if p_yn
        append general xianpian from &cur_xh link
*!*      else
*!*         append general xianpian from .\photo\no_photo.bmp link
     endif
   endscan
   wait window '相片处理完成。。。' nowait
   go top
 else
     go top
 endif
 thisform.refresh 
 ******预处理所有相片按钮的click事件代码结束 
 ********选择单个学生相片按钮的click代码
local dctp
dctp=''
select xianpian
         cur_no = recno()
         if !eof()
           go cur_no
         endif      
        dctp = getpict('bmp')
        if dctp <> ''
          append general xianpian from &dctp link
*!*         else
*!*           append general xianpian from .\photo\no_photo.bmp link
        endif
thisform.refresh
 
********选择单个学生相片按钮的click代码结束

*****查询学号按钮的click代码 
local qxh
qxh = ""
qxh = allt(thisform.text1.value)
select xianpian
locate for allt(xianpian.xuehao) == qxh
  if found()
     dcxh = recn()
     go dcxh
  else
     wait window "没有[ &qxh ]这个学号,请重新输入学号..." nowait
     select xianpian
     go top
  endif
thisform.refresh   
****查询学号结束 

 

文章录入:admin710925    责任编辑:admin710925 
  • 上一篇文章: 没有了

  • 下一篇文章: 没有了
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    PB自学通样章
    PB自学通_内容简介
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    滇ICP备05001862号 爱师软件 站长:尹红泽