Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

delphiµ÷ÓÃExcel²éÕÒ¶¨Î»

var
ExcelFile:string;
SourceRange,DesRange:Variant;
Row,Column,i:integer;
begin
if OpenDialog1.Execute then
begin
ExcelFile:=OpenDialog1.Files[0];
if not FileExists(ExcelFile) then Exit;
end
else
Exit;
try
ExcelApp:=CreateOleObject('Excel.Application');
ExcelApp.WorkBooks.open(ExcelFile);
DesRange:=ExcelApp.WorkSheets[1].Cells.Find('ÐÕÃû');
DesRange:=DesRange.offset[1]; //ÔÚ²éÕÒµ½µÄµ¥Ôª¸ñÏòÏÂÆ«ÒÆ1
Row:=DesRange.Row; //¿ªÊ¼µÄÐкÅ
Column:=DesRange.Column; //ÁкÅ
i:=1;
while i<10 do
begin
ExcelApp.WorkSheets[1].Cells[Row,Column]:='love my wife';//дÈëÊý¾Ý
I:=I+1;
Row:=Row+1;
end;
ExcelApp.Visible:=True;
finally
End;
end;


Ïà¹ØÎĵµ£º

DelphiÖÐʵÏÖC++/JavaÀàËƾ²Ì¬±äÁ¿µÄ¹¦ÄÜ

ÔÚÍøÉÏ¿´µ½ºÜ¶àÈ˶¼ÔÚΪDelphiÊÇ·ñÖ§³ÖC++/JavaÖеľ²Ì¬±äÁ¿¼°¾²Ì¬·½·¨µÄ¹¦ÄܶøÀ§ÈÅ,ÆäʵÕâÔÚDelphiÖÐÊǺܼòµ¥µÄ.
¾²Ì¬·½·¨¾ÍÊÇʹÓÃClass Function. ¾²Ì¬±äÁ¿ÔòʹÓõ¥Ôª¾Ö²¿±äÁ¿À´ÊµÏÖ. ´úÂëÈçÏÂ:
//=========================================
// StaticVarTestU - ¶¨ÒåÁË¿ÉÒÔ¼ÆÊýµÄÀ࣬ͨ¹ýÀà·½·¨¼´¿É·ÃÎÊ´ËÀàµÄ¶ÔÏóÊý ......

delphi TWebBrowser×é¼þʹÓÃÏê½â

delphi TWebBrowser×é¼þʹÓÃÏê½â
      ¸Ã×é¼þÊÇÒ»¸öä¯ÀÀÆ÷×é¼þ£¬¿ÉÒÔÏÔʾһ¸öÖ¸¶¨µØÖ·µÄÍøÒ³¡¢ÉèÖÃÍøÒ³´ò¿ªÊ±µÄÖ÷Ò³ÒÔ¼°¶ÔÍøÒ³½øÐÐÏà¹ØµÄ²Ù×÷£¬Í¬Ê±Ò²¿ÉÒÔ¶ÔHTMLÎļþ½øÐмôÇС¢¸´ÖÆ¡¢Õ³Ìù¡¢É¾³ýµÈ²Ù×÷¡£¸Ã
      ×é¼þÔÚInternet×é¼þÒ³ÖС£
     ......

delphiʵÏÖ×Ö·û´®ÖÐÊý×ÖµÄÅжϼ°ÏàÓ¦Êý×ÖÀÛ¼Ó

×î½üÃæÊÔÁËÒ»¼ÒÆóÒµ,ÏÂÃæÓÐÒ»µÀ´ÓÀ´Ã»ÓÐÏë¹ýµÄÎÊÌâ,µ±Ê±ÓÐ˼·,²»¹ýд²»³öÀ´.»ØÀ´ºó,µ÷ÊÔÁËÒ»ÏÂ,·¢ÏÖ»¹ÊÇÓÐÄѶȵÄ,дÉÏÀ´¿´´ó¼ÒÊÇ·ñ»¹ÓиüÓÅ»¯µÄд·¨,»¶Ó­ÌÖÂÛ:
ÏÂÃæʵÏÖ½«×Ö·û´®"10ad200d3" ÖеÄÊý×ֺϼÆ,10+200+3=213
var s1:string;
var i:integer;
var n1:integer;
var tem1: string;
var tem2:integer;
  ......

DelphiÖÐÈýÖÖ·½·¨»ñÈ¡WindowsÈÎÎñÀ¸µÄ¸ß¶È

µÚÒ»ÖÖ£ºÐèÒªÒýÓÃ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 ......

delphiµÄÈ¡Õûº¯Êýround¡¢trunc¡¢ceilºÍfloor

1.Round£¨ËÄÉáÁùÈëÎåÁôË«£©
¹¦ÄÜ˵Ã÷£º¶ÔÒ»¸öʵÊý½øÐÐËÄÉáÎåÈë¡£(°´ÕÕÒøÐмÒËã·¨)
Àý£º
var
i, j: Integer;
begin
i := Round(1.5); // iµÈÓÚ2
j := Round(2.5); // jµÈÓÚ2
end;
ÔÚDelphiÖÐʹÓÃRoundº¯ÊýµÃµ½µÄ´ð°¸ÓÐʱÓëÎÒÃÇËùÔ¤ÆڵĻ᲻̫һÑù£º²ÉÓõÄÊÇËÄÉáÁùÈëÎåÁôË«¡£¼´µ±Éá»òÈëλ´óÓÚ»òСÓÚÎåÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ