Delphiµ÷ÓÃExcelµÄÆäËü¼¼ÇÉ
1>ÏòÖ¸¶¨µÄÇøÓò»òÐÎ×´Ìí¼Ó³¬Á´½Ó¡£
Óï·¨
±í´ïʽ.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)
±í´ïʽ Ò»¸ö´ú±í Hyperlinks ¶ÔÏóµÄ±äÁ¿¡£
²ÎÊý
Ãû³Æ±ØÑ¡/¿ÉÑ¡Êý¾ÝÀàÐÍÃèÊö
Anchor
±ØÑ¡
Object
³¬Á´½ÓµÄλÖ᣿ÉΪ Range »ò Shape ¶ÔÏó¡£
Address
±ØÑ¡
String
³¬Á´½ÓµÄµØÖ·¡£
SubAddress
¿ÉÑ¡
Variant
³¬Á´½ÓµÄ×ÓµØÖ·¡£
ScreenTip
¿ÉÑ¡
Variant
µ±Êó±êÖ¸ÕëÍ£ÁôÔÚ³¬Á´½ÓÉÏʱËùÏÔʾµÄÆÁÄ»Ìáʾ¡£
TextToDisplay
¿ÉÑ¡
Variant
ÒªÏÔʾµÄ³¬Á´½ÓµÄÎı¾¡£
·µ»ØÖµ
Ò»¸ö Hyperlink ¶ÔÏó£¬Ëü´ú±íеij¬Á´½Ó¡£
˵Ã÷
Ö¸¶¨ TextToDisplay ²ÎÊýʱ£¬Îı¾±ØÐëÊÇ×Ö·û´®¡£
ʾÀý
±¾Ê¾ÀýÏòµ¥Ôª¸ñ A5 Ìí¼Ó³¬Á´½Ó¡£
Visual Basic for Applications
With Worksheets(1)
.Hyperlinks.Add Anchor:=.Range("a5"), _
Address:="http://example.microsoft.com", _
ScreenTip:="Microsoft Web Site", _
TextToDisplay:="Microsoft"
End With
±¾Ê¾ÀýÏòµ¥Ôª¸ñ A5 Ìí¼ÓÒ»¸öµç×ÓÓʼþ³¬Á´½Ó¡£
Visual Basic for Applications
With Worksheets(1)
.Hyperlinks.Add Anchor:=.Range("a5"), _
Address:="mailto:someone@example.com?subject=hello", _
ScreenTip:="Write us today", _
TextToDisplay:="Support"
End With
Ïà¹ØÎĵµ£º
µÚÒ»ÖÖ£ºÐèÒªÒýÓÃ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 ......
Windows ÏÂÒ»¸öµäÐ͵ÄÌØÕ÷¾ÍÊǶàÈÎÎñ£¬ÎÒÃÇ¿ÉÒÔͬʱ´ò¿ª¶à¸ö´°¿Ú½øÐвÙ×÷£¬Ò²¿ÉÒÔͬʱÔËÐгÌÐòµÄ¶à¸öʵÀý£¬±ÈÈç¿ÉÒÔ´ò¿ªÐí¶à¸ö×ÊÔ´¹ÜÀíÆ÷½øÐÐÎļþµÄÒƶ¯¸´ÖƲÙ×÷¡£µ«ÓÐʱ³öÓÚijÖÖ¿¼ÂÇ£¨±ÈÈ簲ȫÐÔ£©£¬ÎÒÃÇÒª×ö³öһЩÏÞÖÆ£¬ÈóÌÐòÖ»Äܹ»ÔËÐÐÒ»¸öʵÀý¡£ÔÚDelphi±à³ÌÖУ¬±ÊÕß×ܽá³öÁËÒÔϼ¸ÖÖ·½·¨£º
¡¡¡¡Ò»¡¢ ²éÕÒ´°¿Ú·¨
¡¡¡ ......
TMS Scripter£ºÖ§³ÖPascalºÍVBScriptÁ½ÖÖÓï·¨¡£ÓŵãÊÇÎĵµÆëÈ«¡¢Àý×ÓÆëÈ«£¬½Å±¾¿ÉÖ±½ÓÖ§³ÖDLL£¬¹Ù·½»¹ÌṩÁ˷ḻµÄIDE Debug¹¤¾ß¡¢µ¥Ôªµ¼³öº¯Êý¹¤¾ßµÈ£¬È±µãÊDZàÒëÔËÐнÏÂý¡£for ¿ÕÑ»·1000Íò´Î£¬ÐèÒª10ÃëÖÓÒÔÉÏ¡£TMS ScripterÊÇÉÌÒµ¹²ÏíÈí¼þ¡£
FastScript£ºÓùýFastReport±¨±íµÄÍ¬Ñ ......
function ExpCalc(exp: string): string;
var
vScript: Variant;
begin
vScript := CreateOleObject('ScriptControl');
vScript.Language := 'VBScript';
Result := vScript.Eval(exp);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
begin
s:=ExpCalc('100 *4.17/0.5*(55. ......