随笔 - 6  文章 - 129  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 814922
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

05 2010 档案

PB添加其它PBL文件
     摘要: 打开PB,把所有的窗口都关掉,
选中主应用程序,右击,选择属性,再选持library list
点击browse 击可选择你要加入的PBL 加入之后,apply 即可!  阅读全文

posted @ 2010-05-26 10:34 Ke 阅读(2643) | 评论 (0)  编辑

PB变量的作用域
     摘要: PowerBuilder的变量作用域共有四种:全局变量、实例变量、共享变量和局部变量。不同作用域的变量需要在不同的位置说明,下面分别予以介绍。在编程窗口、窗口画笔、用户对象画笔或菜单画笔中,选择“Declare”菜单中的“Global Variables”、“Instance Variables”和“Shared Variables”可以分别声明全局、实例和共享这三类变量  阅读全文

posted @ 2010-05-24 10:25 Ke 阅读(2122) | 评论 (0)  编辑

PB 特殊字符
     摘要: 新行(NEWLINE):~n
制表符(TAB):~t
垂直制表(VERTICAL TAB):~v
回车(CARRIGE RETURN):~r
换页(FORMFEED):~f
退格(BACKSPACE):~b
双引号:~"
单引号:~'
弯曲符:~~  阅读全文

posted @ 2010-05-24 09:40 Ke 阅读(1551) | 评论 (0)  编辑

数据窗口控件函数(轉)
     摘要: · 与数据库有关的函数
· 行操作
· 列操作
· 数据操作   阅读全文

posted @ 2010-05-24 09:19 Ke 阅读(528) | 评论 (0)  编辑

Delphi遍历文件夹及子文件夹
     摘要: 字符截取函数LeftStr, MidStr, RightStr
这几个函数都包含在StrUtils中,所以需要uses StrUtils;
假设字符串是 Dstr := ’Delphi is the BEST’, 那么
LeftStr(Dstr, 5) := ’Delph’
MidStr(Dstr, 6, 7) := ’i is th’
RightStr(Dstr, 6) := ’e BEST’

~~~~~~~~~~~~~~~~~~~~~~~~~
function RightStr
(Const Str: String; Size: Word): String;
begin
if Size > Length(Str) then Size := Length(Str) ;
RightStr := Copy(Str, Length(Str)-Size+1, Size)
end;
function MidStr
(Const Str: String  阅读全文

posted @ 2010-05-19 11:48 Ke 阅读(3495) | 评论 (0)  编辑

为TListBox组件添加水平滚动条
     摘要: Delphi的TListBox组件会自动添加一个垂直滚动条,即当列表框的高度容纳不下所有的列表条目时,垂直滚动条就自动显示。但是,当条目的宽度大于列表框的宽度时,水平滚动条不会自动显示。当然, 可以在列表框中加如水平滚动条,方法是在窗体的OnCreate事件处理程序中加入如下代码:

procedure TForm1.FormCreate(Sender: TObject);

var

i, MaxWidth: integer;

begin

MaxWidth := 0;

for i := 0 to ListBox1.Items.Count - 1 do

if MaxWidth < ListBox1.Canvas.TextWidth(ListBox1.Items.Strings[i]) then

MaxWidth := ListBox1.Canvas.TextWidth(ListBox1.Items.Strings[i]);   阅读全文

posted @ 2010-05-19 11:45 Ke 阅读(327) | 评论 (0)  编辑

Delphi中Format与FormatDateTime函数详解
     摘要: 总结一下Format的用法:

Format('x=%d',[12]);//'x=12'//最普通
Format('x=%3d',[12]);//'x=12'//指定宽度
Format('x=%f',[12.0]);//'x=12.00'//浮点数
Format('x=%.3f',[12.0]);//'x=12.000'//指定小数
Format('x=%8.2f'[12.0])//'x=12.00';
Format('x=%.*f',[5,12.0]);//'x=12.00000'//动态配置
Format('x=%.5d',[12]);//'x=00012'//前面补充0
Format('x=%.5x',[12]);//'x=0000C'//十六进制
Format('x=%1:d%0:d',[12,13]);//'x=1312'//使用索引
Format('x=%p',[nil]);//'x=00000000'//指针
Format('x=%1.1e',[12.0]);//'x=1.2E  阅读全文

posted @ 2010-05-19 10:08 Ke 阅读(29845) | 评论 (0)  编辑

Oracle中如何进行进制转换(轉)
     摘要: create or replace function to_base( p_dec in number, p_base in number )
return varchar2
is
l_str varchar2(255) default NULL;
l_num number default p_dec;
l_hex varchar2(16) default '0123456789ABCDEF';
begin
if ( trunc(p_dec) <> p_dec OR p_dec < 0 ) then
raise PROGRAM_ERROR;
end if;
loop
l_str := substr( l_hex, mod(l_num,p_base)+1, 1 ) || l_str;
l_num := trunc( l_num/p_base );
exit when ( l_num = 0 );
end loop;
return l_str;
end to_ba  阅读全文

posted @ 2010-05-18 09:44 Ke 阅读(512) | 评论 (0)  编辑

Delphi+Codesoft 7.0
     摘要: // 变量赋值
if chkParam.Checked then
begin
BarDoc.Variables.Item('var1').Value:= edtPN.Text;
BarDoc.Variables.Item('var2').Value:= edtPartName.Text;
BarDoc.Variables.Item('var3').Value:= edtDesc.Text;
end;

// 打印标签
Bardoc.Printlabel(seqty.Value);
// Feed
BarDoc.FormFeed;
// 关闭
Bardoc.Close;
BarApp.Quit;  阅读全文

posted @ 2010-05-14 08:12 Ke 阅读(1277) | 评论 (0)  编辑

ODAC的安装和使用(odac570src_0.28)
     摘要: 第一步:在odac570src_0.28\Source\Delphi7打开dac70.dpk,然后编译

第二步:打开dacvcl70.dpk,然后编译

第三步:打开dcldac70.dpk,然后编译

第四步:打开odac70.dpk,然后编译
  阅读全文

posted @ 2010-05-06 20:10 Ke 阅读(1768) | 评论 (0)  编辑