procedure TForm2.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Screen.Cursor := -2;
end;
const
crDefault = TCursor(0);
crNone = TCursor(-1);
crArrow = TCursor(-2);
crCross = TCursor(-3);
crIBeam = TCursor(-4);
crSize = TCursor(-22);
crSizeNESW = TCursor(-6);
crSizeNS = TCursor(-7);
crSizeNWSE = TCursor(-8);
crSizeWE = TCursor(-9);
crUpArrow = TCursor(-10);
crHourGlass = TCursor(-11);
crDrag = TCursor(-12);
crNoDrop = TCursor(-13);
crHSplit = TCursor(-14);
crVSplit = TCursor(-15);
crMultiDrag ......
¹ØÓÚÊéÇ©(BookMark)²Ù×÷£»
ÊéÇ©²Ù×÷Ö÷ÒªÓÃÓÚÔÚ±íÖпìËٵض¨Î»¼Ç¼ָÕ룬ÔÚÓ¦ÓóÌÐòÖг£³£Òª±£´æ¼Ç¼ָÕëËùÔÚµÄλÖã¬ÔÚ½øÐÐÆäËû´¦ÀíÖ®ºó£¬Ï£ÍûÄÜ¿ìËٵطµ»Øµ½ÏÈÇ°Ö¸ÕëËùÔÚµÄλÖ㬴Ëʱ£¬Ê¹ÓÃÊéÇ©½«ÏÔµÃÌرðÓÐÓá£ÓйØÊéÇ©²Ù×÷£¬DelphiÌṩÁËÈý¸ö·½·¨£¬ËüÃÇÊÇ£º
¡ñ GetBookMark
¡ñ GotoBookMark
¡ñ FreeBokMark
ÕâÈý¸ö·½·¨Ò»°ã¶¼ÊÇÔÚÒ»ÆðʹÓã¬GetBookMark·½·¨·µ»ØÒ»¸öTBookMarkÀàÐ͵ıäÁ¿£¬¸Ã±äÁ¿°üº¬×ÅÖ¸Ïòµ±Ç°¼Ç¼µÄÖ¸Õ룬GotoMark·½·¨ÓÃÓÚ¿ìËٵؽ«¼Ç¼ָÕ붨λµ½¾ßÓÐÊéÇ©µÄ¼Ç¼´¦¡£FreeBookmark·½·¨ÊÇÓëGetBookMark·½·¨Ïà·´µÄ²Ù×÷£¬ËüÊÍ·ÅÊéÇ©±êÖ¾¡£ÏÂÃæµÄ³ÌÐò´úÂë²ûÊöÁËÊéÇ©²Ù×÷µÄÒ»°ã·½·¨£º
BookMark : TBookMark;
BookMark := Table1.GetBookMark; {¶Ôµ±Ç°¼Ç¼×÷ÊéÇ©±êÖ¾}
Table1.DisableControls; {ÇжÏTable1ÓëÊý¾Ý²ì¾õ²¿¼þµÄÁªÏµ...ÏÂÃæÓÐÆäʹ ......
×î½üÔÚµ÷ÊÔ´úÂë,·¢ÏÖÒ»¸öÎÊÌâ.Ó¦¸ÃËãÊÇbug°É. ºÇ,Èç¹û²»Ëãbug,ÄǾÍÊÇÎÒ¶ÔÆäʵÏÖÔÀíµÄÎó½â.
Èç¹û°Ñ·µ»Ø²ÎÊýResult×÷ΪÁíÒ»º¯ÊýµÄÊäÈë²ÎÊý,resultµÄ³õÖµÊDz»È·¶¨...
function fun(str:string):string;
begin
fun2(result);
end; ......
ÔÚ Delphi ÓïÑÔµÄÊý¾Ý¿â±à³ÌÖУ¬DBGrid ÊÇÏÔʾÊý¾ÝµÄÖ÷ÒªÊÖ¶ÎÖ®Ò»¡£µ«ÊÇ DBGrid ȱʡµÄÍâ¹ÛδÃâÏԵõ¥µ÷ºÍȱ·¦´´Òâ¡£Æäʵ£¬ÎÒÃÇÍêÈ«¿ÉÒÔÔÚÎÒÃǵijÌÐòÖÐͨ¹ý±à³ÌÀ´´ïµ½ÃÀ»¯DBGrid Íâ¹ÛµÄÄ¿µÄ¡£Í¨¹ý±à³Ì£¬ÎÒÃÇ¿ÉÒԸıä DBGrid µÄ±íÍ·¡¢Íø¸ñ¡¢Íø¸ñÏßµÄÇ°¾°É«ºÍ±³¾°É«£¬ÒÔ¼°Ïà¹ØµÄ×ÖÌåµÄ´óСºÍ·ç¸ñ¡£
ÒÔϵÄʾÀý³ÌÐòÑÝʾÁË¶Ô DBGrid ¸÷ÊôÐÔµÄÉèÖã¬Ê¹ Delphi ÏÔʾµÄ±í¸ñ¾ÍÏñÍøÒ³Öеıí¸ñÒ»ÑùƯÁÁÃÀ¹Û¡£
ʾÀý³ÌÐòµÄÔËÐУº
ÔÚ Form1 ÉÏ·ÅÖà DBGrid1¡¢Query1¡¢DataSource1 Èý¸öÊý¾Ý¿â×é¼þ£¬ÉèÖÃÏà¹ØµÄÊôÐÔ£¬Ê¹ DBGrid1 ÄÜÏÔʾ±íÖеÄÊý¾Ý¡£È»ºó£¬ÔÚ DBGrid1 µÄ onDrawColumnCell ʼþÖмüÈëÒÔÏ´úÂ룬ȻºóÔËÐгÌÐò£¬¾Í¿ÉÒÔ¿´µ½ÉñÆæµÄ½á¹ûÁË¡£±¾´úÂëÔÚ Windows98¡¢Delphi5.0 »·¾³Ïµ÷ÊÔͨ¹ý¡£
procedure TMainForm.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;State: TGridDrawState);
var i :integer;
begin
if gdSelected in State then Exit;
//¶¨Òå±íÍ·µÄ×ÖÌåºÍ±³¾°ÑÕÉ«£º
for i :=0 to (Sender as TDBGrid).Colum ......
½ÌÄãÓÃdelphiдµ¯´°¹ã¸æ²å¼þ
2009Äê12ÔÂ25ÈÕ ÐÇÆÚÎå 00:45
½ÌÄãÓÃdelphiдµ¯´°¹ã¸æ²å¼þ
Òý×Ó
Ä¿Ç°Ô½À´Ô½¶àµÄ¹ã¸æ²å¼þÔÚÎÒÃǵçÄÔÉÏÔú¸ùפµØ£¬Ê±²»Ê±µØµ¯³öÁîÈËÌÖÑáµÄ¹ã¸æ£¬²¢ÇÒÿµ±ÎÒÃÇ¿ª»úµÄʱºò¶¼»áµ¯³öÀ´£¬¸ãµÄºÜ¶àС²ËÖ»ÄÜÖØװϵͳ£¬
À´½â¾öÕâÁíÈËÌÖÑáµÄ¹ã¸æ£¡Ó°ÏìÎÒÃÇÉÏÍøÁÄÌ죬ÍæÓÎÏ·£¬¹¤×÷µÈµÈ……ºÜ¶àС²Ë¶¼²»ÖªµÀ¹ã¸æ²å¼þÊÇʲô£¬ÊÇÔõô×ö³öÀ´µÄ¡£
ÏÂÃæÎÒ¾ÍΪ´ó¼Ò½Ò¿ªµ¯´°¹ã¸æµÄÕæʵÃæÄ¿£¬½Ì´ó¼ÒÈçºÎºÜÈÝÒ×µÄ×Ô¼ºÒ²Äܱà³ö
Ò»¸öºÃµÄµ¯´°¹ã¸æ²å¼þ£¡
µÚÒ»²½ ÎÒÃÇÔËÐÐdelphi7£¨µØÇòÈ˶¼ÖªµÀ£¬ºÇºÇ£¡£©
Èçͼ1
ÎÒÃÇÔËÐÐdelphi7£¬ËüÊÇÒ»¸ö¿ÉÊÓ»¯±à¼Æ÷£¬ÔËÐкó³ÌÐò»á×Ô¶¯¸øÎÒÃǽ¨Á¢Ò»¸ö´°Ì壬±ãÓÚÎÒÃDzÙ×÷¡£
ÎÒÃǵĵ¯´°¹ã¸æ¾ÍÊÇÔÚform1Éϱ༳öÀ´µÄ£¡
µÚ¶þ²½ ʹ¹ã¸æ³ÌÐò¿ª»ú×Ô¶¯ÔËÐÐÓëÒþ²Ø
Ë«»÷form1£¬Ìîд³ÌÐò×Ô¶¯Ð´Èë×¢²á±í¹¦ÄÜ£¬ÊµÏÖ¿ª»ú×Ô¶¯ÔËÐеÄÄ¿µÄ¡£
Èçͼ2
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.ShowMainForm:=False;//Òþ²Øform´°Ìå,ÕâÑù×öÊÇΪÁ˲»Ò×±»ÈË·¢ÏÖ£¡
reg:=tregistry.create;
reg.rootkey:=HKEY_LOCAL_MACHINE;
reg.openkey('SOFTWARE\Microsoft\Windows\CurrentVer ......
MSHTMLÊÇ΢Èí¹«Ë¾µÄÒ»¸öCOM×é¼þ£¬¸Ã×é¼þ·â×°ÁËHTMLÓïÑÔÖеÄËùÓÐÔªËؼ°ÆäÊôÐÔ£¬Í¨¹ýÆäÌṩµÄ±ê×¼½Ó¿Ú£¬¿ÉÒÔ·ÃÎÊÖ¸¶¨ÍøÒ³µÄËùÓÐÔªËØ£®
¡¡¡¡MSHTML¶ÔÏóÄ£ÐÍÊÇÓÉһЩ¶ÔÏóºÍ¼¯ºÏ×é³ÉµÄ£®´¦ÓÚ¸ù²¿µÄÊÇHTML£¬ÃèÊöÁË´ò¿ªÒ³ÃæµÄ1¸ö´°¿Ú£¬°üÀ¨Ò»ÏµÁм¯ºÏºÍ¶ÔÏó¡£ÈçFrames¼¯ºÏ£¬History£¬Location£¬Navigator£¬Document£¬Vi—sum£¬Event¶ÔÏóµÈ£®ÆäÖÐÃèÊö³ÊÏÖÔÚ¿Í»§´°¿Úʵ¼ÊÍøÒ³µÄÊÇDocument¶ÔÏó¡£ÓÉһϵÁеÄÊôÐÔ¡¢·½·¨¡¢¶ÔÏóºÍ¼¯ºÏ×é³É£®ÆäÖÐAll¼¯ºÏÖаüº¬ÍøÒ³ÖÐËùÓбê¼Ç(Tag)ÔªËØ£¬ÆäÖ÷ÒªµÄ·½·¨ºÍÊôÐÔÓУº
¡¡¡¡(1)Length(³¤¶È)£º¼´±ê¼Ç³öÏֵĸöÊý£¬¿ÉÒ԰ѱê¼ÇµÄ¼¯ºÏÀí½âΪ´Ó0¿ªÊ¼µÄһάÊý×飬Æä´ÎÐò°´ÕÕ±ê¼ÇÔÚÍøҳλÖÃÅÅÁУ»
¡¡¡¡(2)Tags(±ê¼Ç)£ºÓÃÓÚ¹ýÂ˳ö¸ø¶¨±ê¼ÇµÄ¼¯ºÏ£¬ÈçDoc£®Al1£®Tags(P)µÃµ½ËùÓзֶαê¼ÇP£»
¡¡¡¡(3)Item(ÏîÄ¿)£ºÓÃÓÚÑ¡Ôñ¼¯ºÏÖеÄij1¸öÔªËØ£¬Èçobject£®item(0)µÃµ½¼¯ºÏµÄµÚ1¸öÔªËØ£¬¶øobject£®item(i)µÃµ½µÚi+1¸öÔªËØ£®
¡¡¡¡´ËÍ⣬IHTMLElementÒ²ÊǸö³£Óõļ¯ºÏ¶ÔÏ󣬴ú±íÍøÒ³ÖÐÖ¸¶¨±ê¼ÇµÄ¼¯ºÏ£¬Í¨¹ýÕâ¸ö¼¯ºÏ¶ÔÏ󣬿ÉÒԵõ½ÍøÒ³ÉÏÌض¨±ê¼ÇµÄÄÚÈÝ£®IHTMLElementÓÐ4¸öÖ÷ÒªÊôÐÔ£º
¡¡¡¡(1)InnerText£º¿ªÊ¼±ê¼ÇºÍ½áÊø±ê¼ÇÖ®¼äµÄÎı¾£»
¡¡¡¡(2)InnerHTML£º¿ ......