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

delphi ½«ºº×Ö·­Òë³ÉÆ´ÒôËõдµÄº¯Êý½éÉÜ

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
//ÿ¸öºº×ÖµÄÊ××Öĸ
function GetPyChar(const HZ: AnsiString): string;
const
HZCode: array[0..25, 0..1] of Integer = ((1601, 1636), (1637, 1832), (1833, 2077),
    (2078, 2273), (2274, 2301), (2302, 2432), (2433, 2593), (2594, 2786), (9999, 0000),
    (2787, 3105), (3106, 3211), (3212, 3471), (3472, 3634), (3635, 3722), (3723, 3729),
    (3730, 3857), (3858, 4026), (4027, 4085), (4086, 4389), (4390, 4557), (9999, 0000),
    (9999, 0000), (4558, 4683), (4684, 4924), (4925, 5248), (5249, 5589));
var
i,j,HzOrd: Integer;
begin
i := 1;
while i <= Length(HZ) do
    begin
    if (HZ[i] >= #160) and (HZ[i + 1] >= #160) then
    begin
      HzOrd := (Ord(HZ[i]) - 160) * 100 + Ord(HZ[i + 1]) - 160;
      for j := 0 to 25 do
      begin
        if (HzOrd >= HZCode[j][0]) and (HzOrd <= HZCode[j][1]) then
        begin
          Result := Result + Char(Byte('A') + j);
          Break;
        end;
      end;
      Inc(i);
    end else Result := Result + HZ[i];
      Inc(i);
end;


Ïà¹ØÎĵµ£º

Delphi Êý×é Ïê½â

¼¼Êõ½»Á÷,DH½²½â. Ê×ÏÈÎÒÃÇÒªÖªµÀʲôÊÇÊý×é?Êý×éÊÇÒ»¶ÑÏàÍ¬ÌØÐÔÊý¾ÝµÄÒ»¸ö¼¯ºÏ,Ò²¾ÍÊÇÿ¸öÔªËØµÄÀàÐͱØÐëÊÇÒ»ÑùµÄ,µ±È»ÔÚÆäËûһЩÈõÓï·¨µÄÓïÑÔÀïÃæ,Êý×éµÄÔªËØ¿ÉÒÔÇ§Ææ°Ù¹Ö.
Àý×Ó: Var
A: Array[ 0..2 ] Of Integer ;
Begin
A[ 0 ] := 1 ;
A[ 1 ] := 1.0 ; //ÕâÀïÊÇ´íµÄ,ÒòΪÿ¸öÔªËØ¶¼±ØÐëÊÇIntegerÀàÐ ......

»ñÈ¡Îļþ·¾¶(Delphi ) תÌù

ExtractFileDrive £º·µ»ØÍêÕûÎļþÃûÖеÄÇý¶¯Æ÷£¬Èç"C:"
ExtractFilePath£º·µ»ØÍêÕûÎļþÃûÖеÄ·¾¶£¬×îºó´ø“/”£¬Èç"C:\test\"
ExtractFileDir£º·µ»ØÍêÕûÎļþÃûÖеÄ·¾¶£¬×îºó²»´ø“/” ,Èç"C:\test"
ExtractFileName:·µ»ØÍêÕûÎļþÃûÖеÄÎļþÃû³Æ (´øÀ©Õ¹Ãû)£¬Èç"mytest.doc"
ExtractFileExt ·µ»ØÍ ......

ÔÚDelphiÖÐÈçºÎʹÓÃRCÎļþÖеÄ×Ö·û´®±í

Ê×ÏÈÓÃNotepad»òResource workshop 4.5½¨Á¢RCÎļþ¡£ ½á¹¹ÈçÏ /****************************************************************************
rcdemo.rc
produced by Borland Resource Workshop
*****************************************************************************/
# ......

ÔÚdelphi 7ÖÐʵÏÖ»ñÈ¡ºº×ÖÆ´ÒôÊ××Öĸ

     ¹«Ë¾µÄ²ÍÒûϵͳ³öÆ·µÄÖú¼ÇÂ룬»¹Ã»ÊµÏÖ×Ô¶¯´Ó³öÆ·Ãû³Æ»ñÈ¡ºº×ÖÆ´ÒôÊ××Öĸ¡£
   ËùÒÔÔÚÍøÉÏÕÒÁËÈýÖÖ½â¾ö·½·¨£¬
    Ò»ÖÖÊÇkaguo µÄʹÓó£Óúº×ÖÆ´Òô²éÕÒ·½·¨£¬ÕâÖÖ´úÂëÊ®·Ö¼òµ¥£¬ÊµÏÖ·½±ã£¬µ«ÊÇÕâÖÖ´úÂë½ö½öÊÇÒ»¼¶×ֿ⣬ֻ֧³ÖÈýǧÁ㼸¸ö×ֵġ£
//»ñÈ¡ÖÐÎÄ×Ö´®µÄÉùĸµ ......

Delphi½â¾öË¢ÐÂÉÁ˸¡¢Í¼Æ¬ÎÄ×Ö͸Ã÷¡¢±¨¸æÄÚ´æÐ¹Â¶¡­¡­

1.·ÀֹˢÐÂʱÉÁ˸µÄÖÕ¼«½â¾ö°ì·¨
{ ·ÀֹˢÐÂʱÉÁ˸µÄÖÕ¼«½â¾ö°ì·¨(¶Ô¸¶Ë«»º³åÎÞЧʱ) }
  Perform($000B, 0, 0); //ËøÆÁÄ»  ·ÀÖ¹ÉÁ˸
  // ×öһЩ»á·¢ÉúÑÏÖØÉÁ˸µÄÊÂÇé..
  //½âËøÆÁÄ»²¢ÖØ»­
  Perform($000B, 1, 0);
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ