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

DelphiÖÐÀûÓÃMSCOMM¿Ø¼þ½øÐÐGPSÊý¾Ý²É¼¯

1¡¢×¼±¸
¡¡¡¡GPS£¨Global Positioning System£©£¬¼´È«Çò¶¨Î»ÏµÍ³£¬ÀûÓÃ24¿ÅGPSÎÀÐǵIJâ¾àºÍ²âʱ¹¦ÄܽøÐÐÈ«Çò¶¨Î»£¬ÔÚÐí¶àϵͳÖУ¬Èç»ú³¡µ¼º½ÏµÍ³£¬³ö×â³µÁ¾¹ÜÀíºÍµ÷¶Èϵͳ¡¢½­ºÓÁ÷ÓòµÄÔÖº¦ÐÅÏ¢¹ÜÀíºÍÔ¤²âϵͳÖУ¬GPSµÃµ½Á˹㷺µÄÓ¦Óᣱ¾ÎÄÀûÓÃMSCOMM¿Ø¼þʵÏÖÁËGPSÊý¾ÝµÄ²É¼¯£¬¿ÉΪÐÅÏ¢¹ÜÀíºÍÖ¸»Óµ÷¶ÈµÈÌṩ¶¨Î»Êý¾Ý¡£
¡¡¡¡±¾ÎIJÉÓÃGPSµÄÒì²½´®Ðд«ËÍ·½Ê½£¬½«GARMIN 12C°´NMEA-0183ЭÒéÊä³öµÄÊý¾Ý²É¼¯µ½ÁË΢»ú£¬²¢½«½ÓÊÕµ½µÄµØÀí×ø±êת»»³ÉΪֱ½Ç×ø±ê¡£
¡¡¡¡ÔÚDELPHI 5.0 IDEÖÐн¨Ò»¹¤³Ì£¬ÃûΪGPSReceiver£¬ÔÚÖ÷½çÃæÉÏ·ÅÖÃËĸöTEDIT¿Ø¼þ£¬ÓÃÓÚÏÔʾ½ÓÊÕµ½µÄµØÀí×ø±êºÍת»»ºóµÄÖ±½Ç×ø±ê£¬Æä“name”ÊôÐÔ·Ö±ðΪ£ºEditlatitude¡¢Editlongitude¡¢EditxcoordºÍEditycoord;ÔÚËĸöTEDIT¿Ø¼þÏ·½·ÅÖÃÈý¸ö°´Å¥£¬ÓÃÓÚÊý¾Ý½ÓÊյĿØÖƺÍÍ˳ö³ÌÐò£¬Æä“Caption”ÊôÐÔ·Ö±ðΪ“½ÓÊÕ”¡¢“¶Ï¿ª”ºÍ“·µ»Ø”;ÔÚ½çÃæÉÏÈÎÒâλÖ÷ÅÖÃÒ»¸öTtimer¿Ø¼þ¡¢ÆäÊôÐÔintervalֵΪ“1000”£¬Ö÷ÒªÓÃÓÚÿ¸ôÒ»Ãë½ÓÊÕÒ»´ÎGPSÊý¾Ý;Ò»¸öTMSCOMM¿Ø¼þ¡£³ÌÐòÔËÐкóµÄ½çÃæÈçͼ1(ÂÔ)£º
¡¡¡¡2¡¢±àд´úÂë
¡¡¡¡1£© ÔÚFORMµÄimplementation²¿·ÖÌí¼ÓÒÔÏÂÉùÃ÷
var
nn,x,y,sm,n,weidud,jinchad,firstpxl,secondpxl,a,b,longitude,longitudemargin,latitude:double;
weidustr,weidustrcpy,longitudestr1cpy,longitudestrccpy,
weidustr1,weidustr2,jinchastr,jinchastr1,jinchastr2,longitudestr1,
longitudestr11,longitudestr12,longitudestrc,longitudestrc1,longitudestrc2:string;
gpsstrlist:tstringlist;
gpsstr,gpsstrcpy:string;
gpsstrlen:integer;
¡¡¡¡2)ÔÚFORMµÄFORMSHOWʼþÖÐÌí¼ÓÈçÏ´úÂ룺
procedure Tmainfrm.FormShow(Sender: TObject);
begin
mscomm1.CommPort:=1; //ĬÈÏ´®¿Ú1
mscomm1.InBufferSize:=1024;
mscomm1.Settings:='600,n,8,1'; //²¨ÌØÂÊΪ600
if not mscomm1.PortOpen then
mscomm1.PortOpen:=true; //´ò¿ª´®¿Ú
mscomm1.InBufferCount:=0;
mscomm1.RThreshold:=512;
mscomm1.InputLen:=0;
timer1.Enabled:=false; //¹Ø±Õ¶¨Ê±Æ÷
a:=6378245.0; b:=6356863.0; //²Î¿¼ÍÖÇòµÄ³¤¶ÌÖá
firstpxl:=(a*a-b*b)/a/a; //µÚһƫÐÄÂÊ
secondpxl:=(a*a-b*b)/b/b; //µÚ¶þÆ«ÐÄÂÊ
end;
¡¡¡¡3)Ϊ¶¨Ê±Æ÷Timer1Ìí¼ÓOnTimerʼþÌí¼ÓÈçÏ´úÂ룺
procedure Tmainfrm.Timer1Timer(Sender: TObject);


Ïà¹ØÎĵµ£º

ʹÓÃDelphiµ÷ÓÃWebServices½Ó¿ÚµÄ¼òµ¥Ó¦ÓÃʵÀý

ʹÓÃDelphiµ÷ÓÃWebServices½Ó¿ÚµÄ¼òµ¥Ó¦ÓÃʵÀý
Delphi´Ó6.0¾Í¿ªÊ¼Ö§³ÖWeb ServicesµÄ¿ª·¢ºÍÓ¦ÓÃÁË£¬±¾ÎÄͨ¹ýʹÓÃDelphi 7.0µ÷ÓÃÐÂÀË·¢ËͶÌÐŵÄWeb Service½øÐжÌÐÅÓ¦ÓóÌÐò¿ª·¢ÕâһʵÀýÏêϸµÄ½éÉÜÔÚDelphiÖÐÈçºÎ¿ª·¢»ùÓÚWeb ServicesµÄÓ¦ÓÃϵͳ¡£
µÚÒ»²½£¬×¼±¸¹¤×÷£¬Á˽âÐÂÀ˶ÌÐÅWeb Service¡£ÐÂÀË·¢ËͶÌÐŵÄWeb Serviceµ ......

Delphi Pubic Function

function GetFileSizeString(const pFileName: String):String;
var
iFileSize: Int64;
begin
Result := '0';
iFileSize := FileSizeByName(pFileName);
Result := IntToStr(iFileSize);
end;
  function WinExecAndWait(strFileName: string; uCmdShow: UINT): DWORD;
var
cAppName: array ......

DelphiÎļþ²Ù×÷

 unit unitFileOP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
implementation
function GetSys32Dir:String;
var
Sys32Dir: string;
pSys32Dir: array[0..Max_Path] of char;
begin
GetSystemDirectory(pSys32Dir,Max_Pat ......

Delphi¹ØÁªÎļþÀ©Õ¹Ãû

unit unitMain;
interface
uses
Registry, shlobj,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TExtForm = class(TForm)
ledExtension: TLabeledEdit;
ledAssocApp: TLabeledEdit;
GetAssocApp: TButton;
AssocTh ......

delphi ÈçºÎ°²×°EhLib,DbGridEh¿Ø¼þ

1¡¢µ±È»ÊÇÏÈÒªÐ¶ÔØÒÔǰ°²×°µÄEhlib×é¼þÁË£¬Ôڲ˵¥µÄ“Component”µÄ“install Packeges”ÀѡÔñehlib XX£¬Ñ¡Ôñ“Remove”¡£
2¡¢½ÓÏÂÀ´ÔÚ¿âÀï¼ÓÈëÕâ¸ö¿Ø¼þµÄÒýÓ÷¾¶£¬ÏÈн¨Ò»¸öÎļþ¼Ð£¬±ÈÈç“D:\Component\Ehlib”£¨×îºÃ°ÑÒª°²×°µÄ¿Ø¼þ¶¼¿½±´µ½Õâ¸öComponentĿ¼Ï£©£¬È»ºó°Ñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ