摘要: Request.ServerVariables("Url")返回服务器地址Request.ServerVariables("Path_Info")客户端提供的路径信息Request.ServerVariables("Appl_Physical_Path")与应用程序元数据库路径相应的物理路径Request.ServerVariables("Path_Translated")通过由虚拟至物理的映射后得到的路径Request.ServerVariables("Script_Name")执行脚本的名称 阅读全文
posted @ 2011-07-25 14:47 许明吉博客 阅读(9340) 评论(0) 推荐(0) 编辑
摘要: 版权声明请尊重原创作品。转载请保持文章完整性,并以超链接形式注明原始作者“tingsking18”和主站点地址,方便其他朋友提问和指正。view plainusingSystem;usingSystem.ServiceModel;usingSystem.ServiceModel.Channels;namespaceWcfService3{//注意:如果更改此处的类名“Service1”,也必须更新Web.config和关联的.svc文件中对“Service1”的引用。publicclassService1:IService1{publicstringGetData(intvalue){//提供 阅读全文
posted @ 2011-07-25 14:29 许明吉博客 阅读(934) 评论(0) 推荐(0) 编辑
摘要: Delphi:界面美化,用网页做界面用TWebBrowser控件设置显示的网页,如果在本地则写全路径,放到窗体的create或show事件中var str:string;begin str:=ExtractFilePath(Application.ExeName)+test.html ; //程序目录下的test.html页 webbrowser1.Navigate(str);End;假设网页中有一个链接控件的OnBeforeNavigate2事件procedure TFmain.WebBrowser1BeforeNavigate2(Sender: TObject; const pDisp: 阅读全文
posted @ 2011-07-25 12:06 许明吉博客 阅读(3441) 评论(0) 推荐(0) 编辑
摘要: 判断是否联网在uses中加入WinInetif InternetCheckConnection('http://www.sina.com.cn',1,0) thenbegin showmessage('在线');endelsebegin showmessage('离线');end;或直接用ping后,查看(0% loss)或(100% loss),可知在线或离线 阅读全文
posted @ 2011-07-25 11:56 许明吉博客 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 实现原理是启动一个应用程序,通过ProcessID得到窗体句柄,然后对其设定父窗体句柄为本程序某控件句柄(本例是窗体内一个Panel的句柄),这样就达成了内嵌的效果。本文实现的是内嵌一个记事本程序,如下图:在实现细节上需要注意几点:为了美化程序的嵌入效果,需要隐藏其标题栏在外部窗体大小变化时,需要内嵌的窗体也随之变化大小外部程序退出时,内嵌的程序也要退出下面是例子程序。新建窗体,上面放置一个Panel控件,名为pnlApp,然后按下面代码编写:view sourceprint?unitfrmTestEmbedApp;interfaceusesWindows, Messages, SysUtil 阅读全文
posted @ 2011-07-25 11:54 许明吉博客 阅读(6679) 评论(0) 推荐(0) 编辑
摘要: Delphi获取公网IP地址函数1usesIdHTTP;2functionGetPublicIP:string;3var4strIP,URL:string;5iStart,iEnd:Integer;6MyIdHTTP:TIdHTTP;7begin8Result:='';9MyIdHTTP:=TIdHTTP.Create(nil);10try11try12URL:=MyIdHTTP.Get('http://www.ip138.com/ip2city.asp');13except14end;15finally16MyIdHTTP.Free;17end;1819ifL 阅读全文
posted @ 2011-07-25 11:37 许明吉博客 阅读(4395) 评论(0) 推荐(0) 编辑