Delphiµ÷ÓÃoutlook
//¶¨ÒåÈ«¾Ö±äÁ¿
public
{ Public declarations }
outlook,MailItem,Recipient:variant;
OutlookNameSpace:variant;
OutlookFolder:variant;
OutlookAttachment:variant;
//´´½¨´ò¿ªoutlook
procedure TForm1.CreateOutLook;
begin
try
outlook:=CreateOleObject('OutLook.application');
except
Outlook:=GetActiveOleObject('Outlook.Application');
end;
OutlookNameSpace:=Outlook.GetNamespace('MAPI');
OutlookFolder:=OutlookNameSpace.GetDefaultFolder(6);
MailItem:=OutlookFolder.items;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
CreateOutLook;
WebBrowser1.Navigate('about:');
end;
//ËÑË÷δ¶ÁÓʼþ ²¢ÓÃwebbrowser1ÏÔʾÓʼþÄÚÈÝ
procedure TForm1.bt_SearchMailClick(Sender: TObject);
var
sch:Variant;
Smail:Variant;
strF:string;
i:integer;
mailbody:WideString;
begin
strF:='[senderEmailAddress]="%s" and [unread]=true';
strF:=Format(strF,[Trim(Edit1.Text)]);
sch:=MailItem.Restrict(strF);
mailbody:='ÕÒµ½·ûºÏÌõ¼þµÄÓʼþÊýÁ¿£º'+inttostr(sch.count);
for i:=1 to sch.count do
begin
Smail:=sch.item[i];
mailbody:=mailbody+Smail.HTMLBody;
end;
(webbrowser1.Document as IHtmlDocument2).body.innerHTML:='<div>'+mailbody+'</div>';
end;
//·¢ËÍÓʼþ
procedure TForm1.tb_SendMailClick(Sender: TObject);
begin
MailItem:=outlook.CreateItem(0);
MailItem.BodyFormat:=2;
MailItem.HTMLBody:='<html><Body>'
+'HI:<br> ÄãºÃ!ºÜ¾Ã²»¼û£¬×î½ü¿ÉºÃ£¿'
+'</body></html>';
MailItem.Recipients.add('baronyang@foxmail.com');
MailItem.Subject:='ÖÂÅóÓÑ';
MailItem.Attachments.add('F:\MyFiles\login.ini');
MailItem.Attachments.add('F:\MyFiles\XXXXX.doc');
MailItem.Display;
end;
Ïà¹ØÎĵµ£º
ÔÚDelphi×Ô´øµÄIndy¿Ø¼þÖÐÆäʵÊÇÌṩÁËMD2,MD4,MD5¶ÔÏóµÄ£¬ÎÒÃÇ¿ÉÒÔÖ±½ÓʹÓÃËüÃÇÀ´Íê³ÉMD5µÄÇ©ÃûËã·¨¡£¶ø²»ÐèÒªÔÙÈ¥ÕÒÆäËüµÄ
DLL»òÊÇPasÁË¡£
ÔÚUsesµ¥ÔªÖÐÒýÓà IdHashMessageDigest,IdGlobal, IdHash µ¥Ôª£¬ÔÙдÈçÏ´úÂë¼´¿ÉÒÔ´ïµ½MD5µÄʵÏÖ¡£
ʾÀý´úÂë
procedure TForm1.Button1Click(Sen ......
Delphi ÖÐ FindWindow ºÍ FindWindowEx µÄÓï·¨ºÍÓ÷¨
FindWindow(
lpClassName, {´°¿ÚµÄÀàÃû}
lpWindowName: PChar {´°¿ÚµÄ±êÌâ}
): HWND; {·µ»Ø´°¿ÚµÄ¾ä±ú; ʧ°Ü·µ»Ø 0}
//FindWin ......
µÚÒ»ÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION)));
µÚ¶þÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
function GetSystemTaskBarHeight:Integer;
var
R:TRect;
begin
SystemParametersInfo(SPI_GETWORKAREA,0,@R,0);
Resul ......
http://book.77169.com/data/web5302/20050228/20050228__3692503.html
ActiveX ºÍ Web
ÔÚWindows ²Ù×÷ϵͳÏ£¬ÓÐÒ»¸öÖØÒªµÄ»úÖÆ£¬¾ÍÊÇOLE £¬¾ÍÊÇ¿ÉÒÔÈÃij
¸öÓ¦ÓóÌÐò£¨OLE Controller£©·ÃÎÊÆäËüÓ¦ÓóÌÐò£¨OLE Server£©ËùÌṩµÄ
¹¦ÄÜ£¬ÕâÑù×öµÄºÃ´¦ÊÇ£¬Èç¹ûÒѾÓÐÁËÍê³ÉijÏÄܵijÌÐò£¬Äã¾Í²»±ØÔÙΪ
ijÏÄܱàдÌض¨ ......
1>ÏòÖ¸¶¨µÄÇøÓò»òÐÎ×´Ìí¼Ó³¬Á´½Ó¡£
Óï·¨
±í´ïʽ.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)
±í´ïʽ Ò»¸ö´ú±í Hyperlinks ¶ÔÏóµÄ±äÁ¿¡£
²ÎÊý
Ãû³Æ±ØÑ¡/¿ÉÑ¡Êý¾ÝÀàÐÍÃèÊö
Anchor
±ØÑ¡
Object
³¬Á´½ÓµÄλÖ᣿ÉΪ Range »ò Shape ¶ÔÏó¡£
Address
±ØÑ¡
String
³¬Á´½ÓµÄµØÖ ......