2011年11月18日

delphi 调用javascript

摘要: function ExecScript(Code,Lang,Func:string):string;var script:OleVariant;begin try script:=CreateOleObject('ScriptControl'); script.Language:=Lang; script.AddCode(Code); Result:=script.Eval(Func); except end;end; 阅读全文

posted @ 2011-11-18 18:43 外星E号 阅读(141) 评论(0) 推荐(0) 编辑

2011年10月19日

在delphi中Val是一个将字符串转换为数字的函数

摘要: 在这里Val和iif都是你所用的数据库中的函数 在delphi中Val是一个将字符串转换为数字的函数, Val(S; var V; var Code: Integer)第一个参数是要转换的字符串,第二个参数存放转换后的数字,可以是整数或浮点数,第三个参数存放出错的字符索引值,例如: Var V, Code: Integer; begin Val( '123.445 ',V,Code); end; 转换后: V = 123, Code = 4,表示字符串 '123.445 '转换为整数是123,在字符串第4位转换出错 阅读全文

posted @ 2011-10-19 15:27 外星E号 阅读(1848) 评论(0) 推荐(0) 编辑

2011年10月13日

服务器提交协议冲突 Section=ResponseStatusLine 的解决办法

摘要: 在APP.CONFIG中加入 <system.net> <settings> <httpWebRequest useUnsafeHeaderParsing= "true " /> </settings> </system.net> 阅读全文

posted @ 2011-10-13 10:42 外星E号 阅读(241) 评论(0) 推荐(0) 编辑

2011年10月12日

c#隐藏显示任务栏,要利用API

摘要: 如果你要在你的C#程序中控制Windows的任务栏,有两个Windows api 可以帮到你!他们就是 FindWindowA 和 ShowWindow C#中声明如下: using System.Runtime.InteropServices; [DllImport("user32.dll", EntryPoint = "FindWindowA")] public static extern IntPtr FindWindowA(string lp1, string lp2); [DllImport("user32.dll", En 阅读全文

posted @ 2011-10-12 14:16 外星E号 阅读(1532) 评论(0) 推荐(0) 编辑

2011年10月11日

trunc()

摘要: trunc()1.TRUNC(for dates)TRUNC函数为指定元素而截去的日期值。其具体的语法格式如下:TRUNC(date[,fmt])其中:date 一个日期值fmt 日期格式,该日期将由指定的元素格式所截去。忽略它则由最近的日期截去下面是该函数的使用情况:TRUNC(TO_DATE(’24-Nov-1999 08:00 pm’,’dd-mon-yyyy hh:mi am’))=’24-Nov-1999 12:00:00 am’TRUNC(TO_DATE(’24-Nov-1999 08:37 pm’,’dd-mon-yyyy hh:mi am’,’hh’)) =’24-Nov-19 阅读全文

posted @ 2011-10-11 11:52 外星E号 阅读(299) 评论(0) 推荐(0) 编辑

StringReplace函数

摘要: stringreplacelabel1.Caption := stringreplace('2008-09-02','-','/',[rfReplaceAll]);function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;S:源字符串;OldPattern:要被替换的字符串;NewPattern:替换的字符串;Flags:有两种参数:1. rfReplaceAll,将出现的所有要被替换的字符串都替换掉; 2.rfIgn 阅读全文

posted @ 2011-10-11 11:42 外星E号 阅读(154) 评论(0) 推荐(0) 编辑

delphi常用函数大全

摘要: Abort函数引起放弃的意外处理Abs函数绝对值函数AddExitProc函数将一过程添加到运行时库的结束过程表中Addr函数返回指定对象的地址AdjustLineBreaks函数将给定字符串的行分隔符调整为CR/LF序列Align属性使控件位于窗口某部分Alignment属性控件标签的文字位置AllocMem函数在堆栈上分配给定大小的块AllowGrayed属性允许一个灰度选择AnsiCompareStr函数比较字符串(区分大小写)AnsiCompareText函数比较字符串(不区分大小写)AnsiLowerCase函数将字符转换为小写AnsiUpperCase函数将字符转换为大写Appen 阅读全文

posted @ 2011-10-11 11:20 外星E号 阅读(3102) 评论(0) 推荐(0) 编辑

2011年10月8日

解开多线程时webRequest最多只能同时进行两个事务的限制

摘要: 在Form_Load中加入 System.Net.ServicePointManager.DefaultConnectionLimit = 1000; 阅读全文

posted @ 2011-10-08 15:58 外星E号 阅读(233) 评论(0) 推荐(0) 编辑

程序循环的时候防止程序假死

摘要: 在循环里面加入 Application.DoEvents(); 阅读全文

posted @ 2011-10-08 13:47 外星E号 阅读(186) 评论(0) 推荐(0) 编辑

线程里改变控件的属性,禁止提示错误

摘要: Control.CheckForIllegalCrossThreadCalls = false; 阅读全文

posted @ 2011-10-08 13:46 外星E号 阅读(71) 评论(0) 推荐(0) 编辑

导航