02 2012 档案

获得一个网页的所有的URL(WebBrowser)
摘要://记得要引用MSHTMLprocedure TForm1.Button6Click(Sender: TObject);var Doc: IHTMLDocument2; Len: Integer; item: OleVariant; all: IHTMLElementCollection; I: Integer;begin Doc := WebBrowser1.Document as IHTMLDocument2; all := Doc.links; Len := all.length; for I := 0 to Len -1 do begin item :=... 阅读全文

posted @ 2012-02-22 15:55 long6 阅读(1706) 评论(0) 推荐(1)

DELPHI自动分析表单(WebBrowser)
摘要://-----先创建一个WebBrowser,以及自己Negative,也就是先打开一个页面///----------------stringgrid初始化-------------procedure TForm1.stringCreate(StringGrid: TStringGrid);begin StringGrid.Cells[0, 0] := '序号 '; StringGrid.Cells[1, 0] := 'ID号 '; StringGrid.Cells[2, 0] := '类别 '; StringGrid.Cells[3, 0] : 阅读全文

posted @ 2012-02-22 11:03 long6 阅读(1495) 评论(0) 推荐(1)

取得任意位的随机数
摘要:function TForm1.RandomStr(UP: boolean; Low: boolean; Number: boolean; Digit: integer):string;//--大写字母,小写字母,数字,字符串的位数var i: Byte; s: string;begin if UP then s := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' else s := ''; if Low then s := s + 'abcdefghijklmnopqrstuvwxyz'; if Number then s := s 阅读全文

posted @ 2012-02-08 10:58 long6 阅读(282) 评论(0) 推荐(1)

delphi XE2 托盘程序
摘要://----------这是在 delphi xe2-----------//unit Umain;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Menus, Winapi.ShellAPI;type TForm1 = class(TForm) Button1: TBut... 阅读全文

posted @ 2012-02-07 17:49 long6 阅读(975) 评论(0) 推荐(1)

SQL常用的小方法
摘要:1、--- 取得与表名相关的存储过程、方法、函数 selecT A.* from sysobjects A, syscomments B where a.id= B.id and b.text like '%你的表名%' --------一定要like '%..%' 这样 要不查询不出任何东西来2、--取得一个表的所有的字段名(下面两个的效果是一样的) select name from syscolumns where id=object_id('表名') select name from syscolumns where id in (sele 阅读全文

posted @ 2012-02-06 11:53 long6 阅读(202) 评论(0) 推荐(1)

屏蔽F1的练习(hook)
摘要://-----------勾子判断按键方法-------function LowLevelKeyboardProc(Wnode: Integer; Wparam: WPARAM; Lparam: LPARAM):LRESULT;stdcall;type KeyHook = record VKcode: DWORD; ScanCode: DWord; Flags: DWord; Time: DWord; dwExtraInfo: DWord; end;var p : ^keyhook;begin Result := 0; p := Pointer(Lpar... 阅读全文

posted @ 2012-02-02 15:48 long6 阅读(428) 评论(0) 推荐(1)

隐藏系统的任务栏、桌面图标
摘要://--------Flag 为全局变量,初始化为false//--------Shell_TrayWnd 为系统任务栏窗口的类名//------这里是隐藏任务栏的---------------------procedure TForm2.Button3Click(Sender: TObject);var h: HWND;begin h := FindWindow('Shell_TrayWnd', nil); if (h <> 0) and (flag = False) then begin ShowWindow(h, SW_SHOW); flag := True 阅读全文

posted @ 2012-02-02 14:38 long6 阅读(449) 评论(0) 推荐(0)

取得计算机名(delphi )
摘要://------非常简单------------------------procedure TForm2.Button2Click(Sender: TObject);var s: Cardinal; p: PChar;begin s := MAX_COMPUTERNAME_LENGTH + 1; GetMem(p, s); if GetComputerName(p,s) then begin caption := StrPas(p); end else ShowMessage('取不到计算机名'); FreeMem(p); //记得一定要释放end; 阅读全文

posted @ 2012-02-02 11:56 long6 阅读(305) 评论(0) 推荐(1)

TWebBrowser取得一个页面的所有链接
摘要://--------列出一个页面的所有的链接---------procedure TForm1.Button6Click(Sender: TObject);var Doc: IHTMLDocument2; Len: Integer; item: OleVariant; all: IHTMLElementCollection; I: Integer;begin Doc := WebBrowser1.Document as IHTMLDocument2; all := Doc.links; Len := all.length; for I := 0 to Len -1 do... 阅读全文

posted @ 2012-02-01 18:00 long6 阅读(339) 评论(0) 推荐(1)

导航