如何在pb中打开一个word文档
是不是要禁止程序重复打开? 是的话,脚本在下面global external functions 添加FUNCTION long FindWindowA( ulong Winhandle, string wintitle ) Library 'user32' Function ulong CreateMutexA (ulong lpMutexAttributes, int bInitialOwner, ref string lpName) library 'kernel32.dll' Function ulong GetLastError () library 'kernel32.dll'app 的open 事件 添加ulongll_mutex, ll_err stringls_mutex_name if handle (GetApplication (), false) 0 then ls_mutex_name = this.AppName + char (0) ll_mutex = CreateMutexA (0, 0, ls_mutex_name) ll_err = GetLastError () if ll_err = 183 then messagebox("","程序已经运行")Halt closeend ifend if open(w_1)
pb如何将一个word 插入另一个word指定位置
先建立一个ListBox对象(DDLB也可),不想让它显示可以将其visible=falselb_1.DIRLIST("C:\windows\*.*" , 32)//32是指显示文件,不懂可以看DIRLIST的帮助int ffffff = lb_1.totalitems()//统计C:\windows中文件的总数if fff>0 then......//后面的你就清楚了!
关于PB判断日期大小的问题
比如数据窗口为dw_1,姓名字段为name,学号为id.首选要确定的是多行数据还是一行数据.①1行数据:string ls_temp dw_1.accepttext()//将用户编辑数据窗口的值存入缓存区ls_temp = dw_1.object.name[1]if isnull(ls_temp) or ls_temp ='' thenmessagebox('提示','姓名不能为空!')returnend if ls_temp = dw_1.object.id[1]if isnull(ls_temp) or ls_temp ='' thenmessagebox('提示','学号不能为空!')returnend if ② 多行:string ls_templong idw_1.accepttext()//将用户编辑数据窗口的值存入缓存区for i=1 to dw_1.rowcount()ls_temp = dw_1.object.name[i]if isnull(ls_temp) or ls_temp ='' thenmessagebox('提示','第'+string(i)+'行姓名不能为空!')returnend ifls_temp = dw_1.object.id[i]if isnull(ls_temp) or ls_temp ='' thenmessagebox('提示','第'+stirng(i)+'行学号不能为空!')returnend if next
pb中如果判断某张表是否空表
Return value Returns the number of rows displayed (that is, rows in the primary buffer) if it succeeds and -1 if it fails. If there is no DataWindow object assigned to the DataWindow control or DataStore, this method returns -1.retrieve本身有返回值的,成功是0,-1失败,你试一下PS:sqlcode一般是判断sql语句的执行状态,和数据窗口检索数据无关
转载请注明出处51数据库 » pb判断word跨页信息
殺獁忑