随笔分类 - DELPHI
摘要:调用系统关机 uses Comobj; var shellapp: variant; begin shellapp := CreateOleObject('Shell.Application'); shellapp.ShutDownWindows; end; 调用系统关于对话框 uses shellapi; shellabout(Handle,'系统信息','ACCESS小...
阅读全文
摘要:const NumberArray: array[0..9] of string = ('零', '壹','貳','叁','肆','伍','陆','柒','捌','玖'); // 数字转与大写 function GetMoneySwitch(AMoney: string): string; // 去除所有分隔符 procedure ClearComma(var AValue: string)...
阅读全文
摘要:从数据库导数据至excel 容易,但要是想把excel 里的数据通过delphi写的程式导入数据库就没那么简单了,并且网上讲的都不全面,没有几个完整可行的方案,以下是我收集的个人认为比较可行的方案,不敢独享,故拿出来供大家学习参考之用! procedure load(rowCount,colCount:integer; fileName:String; var grid:TStringGri...
阅读全文
摘要:delphi TStringList的用法 TStrings是一个抽象类,在实际开发中,是除了基本类型外,应用得最多的。 常规的用法大家都知道,现在来讨论它的一些高级的用法。 先把要讨论的几个属性列出来: 1、CommaText 2、Delimiter & DelimitedText 3、Names & Values & ValueFromIndex 先看第一个:CommaText。怎么用呢...
阅读全文
摘要:方法 说明 GoBack 相当于IE的“后退”按钮,使你在当前历史列表中后退一项 ...
阅读全文
摘要:procedure OpenChildForm(FormClass: TFormClass; var Fm; AOwner:TComponent); var i: integer; Child:TForm; begin for i := 0 to Screen.FormCount -1 do if Screen.Forms[i].ClassType=FormClass th...
阅读全文
摘要:shellexecute(handle,'open',pchar('http://www.tecsoon.cn'),nil,nil,sw_show)
阅读全文
摘要:Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Start Page"="http://www.Tecsoon.com/"
阅读全文
摘要:uses mshtml,activex; function TForm1.wr(b: Twebbrowser; s: string): bool; var d: IHTMLDocument2; a: Variant; begin b.Navigate('about:blank'); try d:=b.document as IHTMLDocument2; a := VarAr...
阅读全文
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, xmldom, XMLIntf, msxmldom, XMLDoc, StdCtrls, ExtCtrls, ComCtrls; type TForm1 = clas...
阅读全文
摘要:procedure TForm1.Button1Click(Sender: TObject); begin //打开网页 WebBrowser1.Navigate(Edit1.Text); end; procedure TForm1.ToolButton8Click(Sender: TObject); begin //退出程序 Close; end; procedure TForm1.T...
阅读全文
摘要:procedure TForm1.FormCreate(Sender: TObject); begin //在LISTBOX 中载入字体 Lst1.Items:=Screen.Fonts; self.MainMenu1.AutoHotkeys:=maManual; self.MainMenu1.AutoLineReduction:=maManual; /...
阅读全文
摘要:unit Umainform; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ToolWin, Menus, ImgList, StdCtrls,Uchildform; type TMainForm1 = class...
阅读全文
摘要:unit Uchildform; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls, ComCtrls; type TChildForm = class(TForm) MainMenu1: TMain...
阅读全文
摘要:Some styles for your pagination http://www.mis-algoritmos.com/2007/03/16/some-styles-for-your-pagination/ 控件源码网 http://www.worktool.cn/WinFormKongJian/2008-09/66.htm http://www.viscomsoft.com/product...
阅读全文
摘要:with XPColorMap1 do begin Color := clSkyBlue; //左边菜单 MenuColor := $FFFFFF; //下拉整个菜单面版 ShadowColor := $CCCCCC; //背景颜色 //下拉边界颜色 FrameTopLeftInner := $FFFFFF; //左上边界颜色 Fr...
阅读全文
摘要:{ 2002.8.5 Kingron } { Source:Source string } { Sub:Sub string } { Return:Count ...
阅读全文
摘要:聊天用户发言分色显示 procedure TForm1.Button3Click(Sender: TObject); begin RichEdit1.SelStart := MaxInt; RichEdit1.SelAttributes.Color := clblue; RichEdit1.Lines.Add(DateTimeToStr(Now)+ '大宝 说: '); RichEdit1.Lin...
阅读全文
摘要:加PopupMenu1 Listbox1的PopupMenu属性设为PopupMenu1 procedure TForm1.ListBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button=MBRight then begin ...
阅读全文
摘要:Delphi中FindWindow,FindWindowEx,SendMessage妙用: var i,j,k:integer; begin i:=FindWindow(nil,'与 ●┌哒!ňg 聊天中'); //查找主窗口 j:=FindWindowEx(i,0,'#32770',''); k:=FindWindowEx(j,0,'Button'...
阅读全文

浙公网安备 33010602011771号